connectedOrganization の更新
[アーティクル]
01/20/2022
2 人の共同作成者
この記事の内容
名前空間: microsoft.graph
connectedOrganization オブジェクトを更新 して、1 つ以上のプロパティを変更します。
アクセス許可
この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可 」を参照してください。
アクセス許可の種類
アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校のアカウント)
EntitlementManagement.ReadWrite.All
委任 (個人用 Microsoft アカウント)
サポートされていません。
アプリケーション
EntitlementManagement.ReadWrite.All
HTTP 要求
PATCH /identityGovernance/entitlementManagement/connectedOrganizations/{connectedOrganizationId}
名前
説明
Authorization
ベアラー {token}。必須。
Content-Type
application/json. Required.
要求本文
要求本文では、更新する必要があるプロパティの値 のみ を指定します。要求本文に含まれていない既存のプロパティは、以前の値を保持するか、他のプロパティ値の変更に基づいて再計算されます。
次の表に、更新できるプロパティを示します。
応答
成功した場合、このメソッドは応答コードと、応答本文 202 Accepted の connectedOrganization オブジェクトを返します。
例
要求
PATCH https://graph.microsoft.com/v1.0/identityGovernance/entitlementManagement/connectedOrganizations/{id}
Content-Type: application/json
{
"displayName":"Connected organization new name",
"description":"Connected organization new description",
"state":"configured"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var connectedOrganization = new ConnectedOrganization
{
DisplayName = "Connected organization new name",
Description = "Connected organization new description",
State = ConnectedOrganizationState.Configured
};
await graphClient.IdentityGovernance.EntitlementManagement.ConnectedOrganizations["{connectedOrganization-id}"]
.Request()
.UpdateAsync(connectedOrganization);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
const options = {
authProvider,
};
const client = Client.init(options);
const connectedOrganization = {
displayName: 'Connected organization new name',
description: 'Connected organization new description',
state: 'configured'
};
await client.api('/identityGovernance/entitlementManagement/connectedOrganizations/{id}')
.update(connectedOrganization);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identityGovernance/entitlementManagement/connectedOrganizations/{id}"]]];
[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphConnectedOrganization *connectedOrganization = [[MSGraphConnectedOrganization alloc] init];
[connectedOrganization setDisplayName:@"Connected organization new name"];
[connectedOrganization setDescription:@"Connected organization new description"];
[connectedOrganization setState: [MSGraphConnectedOrganizationState configured]];
NSError *error;
NSData *connectedOrganizationData = [connectedOrganization getSerializedDataWithError:&error];
[urlRequest setHTTPBody:connectedOrganizationData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
ConnectedOrganization connectedOrganization = new ConnectedOrganization();
connectedOrganization.displayName = "Connected organization new name";
connectedOrganization.description = "Connected organization new description";
connectedOrganization.state = ConnectedOrganizationState.CONFIGURED;
graphClient.identityGovernance().entitlementManagement().connectedOrganizations("{id}")
.buildRequest()
.patch(connectedOrganization);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewConnectedOrganization()
displayName := "Connected organization new name"
requestBody.SetDisplayName(&displayName)
description := "Connected organization new description"
requestBody.SetDescription(&description)
state := "configured"
requestBody.SetState(&state)
connectedOrganizationId := "connectedOrganization-id"
graphClient.IdentityGovernance().EntitlementManagement().ConnectedOrganizationsById(&connectedOrganizationId).Patch(requestBody)
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
Import-Module Microsoft.Graph.Identity.Governance
$params = @{
DisplayName = "Connected organization new name"
Description = "Connected organization new description"
State = "configured"
}
Update-MgEntitlementManagementConnectedOrganization -ConnectedOrganizationId $connectedOrganizationId -BodyParameter $params
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
応答
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 202 Accepted
Content-type: application/json
{
"id": "006111db-0810-4494-a6df-904d368bd81b",
"displayName":"Connected organization new name",
"description":"Connected organization new description",
"state":"configured"
}