dataSharingConsent の更新
名前空間: microsoft.graph
重要: Microsoft Graph /beta バージョンの API は変更される場合があります。実稼働での使用はサポートされていません。
注: Intune 用 Microsoft Graph API には、テナントの 有効な Intune ライセンスが必要です。
dataSharingConsent オブジェクトのプロパティを更新します。
前提条件
この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可」を参照してください。
| アクセス許可の種類 | アクセス許可 (特権の小さいものから大きいものへ) |
|---|---|
| 委任 (職場または学校アカウント) | DeviceManagementServiceConfig.ReadWrite.All |
| 委任 (個人用 Microsoft アカウント) | サポートされていません。 |
| アプリケーション | DeviceManagementServiceConfig.ReadWrite.All |
HTTP 要求
PATCH /deviceManagement/dataSharingConsents/{dataSharingConsentId}
要求ヘッダー
| ヘッダー | 値 |
|---|---|
| Authorization | ベアラー <トークン> が必要です。 |
| 承諾 | application/json |
要求本文
要求本文で 、dataSharingConsent オブジェクトの JSON 表記を指定します。
次の表に 、dataSharingConsentを作成するときに必要なプロパティを示します。
| プロパティ | 型 | 説明 |
|---|---|---|
| id | String | データ共有の同意 ID |
| serviceDisplayName | String | サービス作業フローの表示名 |
| termsUrl | String | データ共有の同意に関する TermsUrl |
| granted | ブール値 | データ共有の同意の付与された状態 |
| grantDateTime | DateTimeOffset | このアカウントに対する同意が付与された時間 |
| grantedByUpn | String | このアカウントの同意を与えたユーザーの Upn |
| grantedByUserId | String | このアカウントに対する同意を与えたユーザーの UserId |
応答
成功した場合、このメソッドは応答コードと、応答本文で更新 200 OK された dataSharingConsent オブジェクトを返します。
例
要求
以下は、要求の例です。
PATCH https://graph.microsoft.com/beta/deviceManagement/dataSharingConsents/{dataSharingConsentId}
Content-type: application/json
Content-length: 333
{
"@odata.type": "#microsoft.graph.dataSharingConsent",
"serviceDisplayName": "Service Display Name value",
"termsUrl": "https://example.com/termsUrl/",
"granted": true,
"grantDateTime": "2016-12-31T23:59:55.7154191-08:00",
"grantedByUpn": "Granted By Upn value",
"grantedByUserId": "Granted By User Id value"
}
応答
以下は、応答の例です。注:簡潔にするために、ここに示す応答オブジェクトは切り詰められている場合があります。すべてのプロパティは実際の呼び出しから返されます。
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 382
{
"@odata.type": "#microsoft.graph.dataSharingConsent",
"id": "333387f7-87f7-3333-f787-3333f7873333",
"serviceDisplayName": "Service Display Name value",
"termsUrl": "https://example.com/termsUrl/",
"granted": true,
"grantDateTime": "2016-12-31T23:59:55.7154191-08:00",
"grantedByUpn": "Granted By Upn value",
"grantedByUserId": "Granted By User Id value"
}
フィードバック
フィードバックの送信と表示