WorkforceIntegration を取得する
[アーティクル]
01/20/2022
3 人の共同作成者
この記事の内容
名前空間: microsoft.graph
workforceIntegration オブジェクトのプロパティとリレーションシップを取得します。
アクセス許可
この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可 」を参照してください。
アクセス許可の種類
アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校のアカウント)
WorkforceIntegration.Read.All, WorkforceIntegration.ReadWrite.All
委任 (個人用 Microsoft アカウント)
サポートされていません。
アプリケーション
サポートされていません。
注 : この API は、管理者のアクセス許可をサポートします。 グローバル管理者は、メンバーではないグループにアクセスできます。
HTTP 要求
GET /teamwork/workforceIntegrations/{workforceIntegrationId}
省略可能なクエリ パラメーター
また、このメソッドは応答をカスタマイズするための一部の OData クエリ パラメーターをサポートします。 一般的な情報については、「OData クエリ パラメーター 」を参照してください。
名前
説明
Authorization
ベアラー {token}。必須。
要求本文
このメソッドには、要求本文を指定しません。
応答
成功した場合、このメソッドは応答コードと、応答本文で要求 200 OK された workforceIntegration オブジェクトを返します。
例
要求
要求の例を次に示します。
GET https://graph.microsoft.com/v1.0/teamwork/workforceIntegrations/{workforceintegrationid}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var workforceIntegration = await graphClient.Teamwork.WorkforceIntegrations["{workforceIntegration-id}"]
.Request()
.GetAsync();
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
const options = {
authProvider,
};
const client = Client.init(options);
let workforceIntegration = await client.api('/teamwork/workforceIntegrations/{workforceintegrationid}')
.get();
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/teamwork/workforceIntegrations/{workforceintegrationid}"]]];
[urlRequest setHTTPMethod:@"GET"];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
MSGraphWorkforceIntegration *workforceIntegration = [[MSGraphWorkforceIntegration alloc] initWithData:data error:&nserror];
}];
[meDataTask execute];
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
WorkforceIntegration workforceIntegration = graphClient.teamwork().workforceIntegrations("{workforceintegrationid}")
.buildRequest()
.get();
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
workforceIntegrationId := "workforceIntegration-id"
result, err := graphClient.Teamwork().WorkforceIntegrationsById(&workforceIntegrationId).Get()
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
応答
応答の例を次に示します。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-type: application/json
{
"id": "c5d0c76b-80c4-481c-be50-923cd8d680a1",
"displayName": "KronosWorkforceIntegration",
"apiVersion": 1,
"isActive": true,
"encryption": {
"protocol": "sharedSecret",
"secret": null
},
"url": "https://contosoWorkforceIntegration.com/Contoso/",
"supportedEntities": "shift"
}