deviceManagementIntentDeviceState の更新

名前空間: microsoft.graph

重要: Microsoft Graph /beta バージョンの API は変更される場合があります。実稼働での使用はサポートされていません。

注: Intune 用 Microsoft Graph API には、テナントの 有効な Intune ライセンスが必要です。

deviceManagementIntentDeviceState オブジェクトのプロパティを更新します。

前提条件

この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可」を参照してください。

アクセス許可の種類 アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校アカウント) DeviceManagementConfiguration.ReadWrite.All
委任 (個人用 Microsoft アカウント) サポートされていません。
アプリケーション DeviceManagementConfiguration.ReadWrite.All

HTTP 要求

PATCH /deviceManagement/intents/{deviceManagementIntentId}/deviceStates/{deviceManagementIntentDeviceStateId}

要求ヘッダー

ヘッダー
Authorization ベアラー <トークン> が必要です。
承諾 application/json

要求本文

要求本文で 、deviceManagementIntentDeviceState オブジェクトの JSON 表記を指定します。

次の表に 、deviceManagementIntentDeviceState を作成するときに必要なプロパティを示します

プロパティ 説明
id String The ID
userPrincipalName String デバイスで報告されているユーザー プリンシパル名
userName String デバイスで報告されるユーザー名
deviceDisplayName String 報告されるデバイス名
lastReportedDateTime DateTimeOffset インテント レポートの最終変更日時
state complianceStatus インテントのデバイスの状態。 可能な値は、unknownnotApplicablecompliantremediatednonComplianterrorconflictnotAssigned です。
deviceId String 報告されているデバイス ID

応答

成功した場合、このメソッドは応答コードと、応答本文で 200 OK 更新された deviceManagementIntentDeviceState オブジェクトを返します。

要求

以下は、要求の例です。

PATCH https://graph.microsoft.com/beta/deviceManagement/intents/{deviceManagementIntentId}/deviceStates/{deviceManagementIntentDeviceStateId}
Content-type: application/json
Content-length: 342

{
  "@odata.type": "#microsoft.graph.deviceManagementIntentDeviceState",
  "userPrincipalName": "User Principal Name value",
  "userName": "User Name value",
  "deviceDisplayName": "Device Display Name value",
  "lastReportedDateTime": "2017-01-01T00:00:17.7769392-08:00",
  "state": "notApplicable",
  "deviceId": "Device Id value"
}

応答

以下は、応答の例です。注:簡潔にするために、ここに示す応答オブジェクトは切り詰められている場合があります。すべてのプロパティは実際の呼び出しから返されます。

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 391

{
  "@odata.type": "#microsoft.graph.deviceManagementIntentDeviceState",
  "id": "8db75881-5881-8db7-8158-b78d8158b78d",
  "userPrincipalName": "User Principal Name value",
  "userName": "User Name value",
  "deviceDisplayName": "Device Display Name value",
  "lastReportedDateTime": "2017-01-01T00:00:17.7769392-08:00",
  "state": "notApplicable",
  "deviceId": "Device Id value"
}