Update externalGroup
Article
04/29/2022
2 minutes to read
8 contributors
In this article
Namespace: microsoft.graph.externalConnectors
Update the properties of an externalGroup object.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions .
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
ExternalItem.ReadWrite.OwnedBy, ExternalItem.ReadWrite.All
Delegated (personal Microsoft account)
Not supported
Application
ExternalItem.ReadWrite.OwnedBy, ExternalItem.ReadWrite.All
HTTP request
PATCH /external/connections/{connectionsId}/groups/{externalGroupId}
Name
Description
Authorization
Bearer {token}. Required.
Content-Type
application/json. Required.
Request body
In the request body, supply the values for relevant properties that should be updated. Existing properties that are not included in the request body will maintain their previous values or be recalculated based on changes to other property values. For best performance, do not include properties that are not changing.
Property
Type
Description
displayName
String
The friendly name of the external group. Optional.
description
String
The description of the external group. Optional.
Response
If successful, this method returns a 204 No Content
response code.
Example
Request
PATCH https://graph.microsoft.com/v1.0/external/connections/{connectionsId}/groups/{externalGroupId}
Content-Type: application/json
{
"displayName": "Contoso Marketing",
"description": "The product marketing team"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var externalGroup = new Microsoft.Graph.ExternalConnectors.ExternalGroup
{
DisplayName = "Contoso Marketing",
Description = "The product marketing team"
};
await graphClient.External.Connections["{externalConnectors.externalConnection-id}"].Groups["{externalConnectors.externalGroup-id}"]
.Request()
.UpdateAsync(externalGroup);
Read the SDK documentation for details on how to add the SDK to your project and create an authProvider instance.
const options = {
authProvider,
};
const client = Client.init(options);
const externalGroup = {
displayName: 'Contoso Marketing',
description: 'The product marketing team'
};
await client.api('/external/connections/{connectionsId}/groups/{externalGroupId}')
.update(externalGroup);
Read the SDK documentation for details on how to add the SDK to your project and create an authProvider instance.
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/external/connections/{connectionsId}/groups/{externalGroupId}"]]];
[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphExternalConnectorsExternalGroup *externalGroup = [[MSGraphExternalConnectorsExternalGroup alloc] init];
[externalGroup setDisplayName:@"Contoso Marketing"];
[externalGroup setDescription:@"The product marketing team"];
NSError *error;
NSData *externalGroupData = [externalGroup getSerializedDataWithError:&error];
[urlRequest setHTTPBody:externalGroupData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
Read the SDK documentation for details on how to add the SDK to your project and create an authProvider instance.
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
ExternalGroup externalGroup = new ExternalGroup();
externalGroup.displayName = "Contoso Marketing";
externalGroup.description = "The product marketing team";
graphClient.external().connections("{connectionsId}").groups("{externalGroupId}")
.buildRequest()
.patch(externalGroup);
Read the SDK documentation for details on how to add the SDK to your project and create an authProvider instance.
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewExternalGroup()
displayName := "Contoso Marketing"
requestBody.SetDisplayName(&displayName)
description := "The product marketing team"
requestBody.SetDescription(&description)
externalConnectionId := "externalConnection-id"
externalGroupId := "externalGroup-id"
graphClient.External().ConnectionsById(&externalConnectionId).GroupsById(&externalGroupId).Patch(requestBody)
Read the SDK documentation for details on how to add the SDK to your project and create an authProvider instance.
Response
HTTP/1.1 204 No Content