informationProtectionLabel: evaluateClassificationResults

名前空間: microsoft.graph

重要

Microsoft Graph のバージョンの /beta API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 API が v1.0 で使用できるかどうかを確認するには、 バージョン セレクターを使用します。

分類結果を使用して、適用する必要がある情報保護ラベルを計算し、情報に正しくラベルを付けるために実行する必要がある一連のアクションを返します。 この API は、ユーザーまたはサービスによって直接ラベル付けされるのではなく、ファイルの内容の分類に基づいてラベルを自動的に設定する必要がある場合に便利です。

分類結果に基づいて評価するには、既存のコンテンツ メタデータ のキーと値のペア分類結果を含む contentInfo を指定します。 API は、次のいずれかを含む informationProtectionAction を返します。

アクセス許可

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

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

HTTP 要求

POST /informationProtection/policy/labels/{id}/evaluateClassificationResults

要求ヘッダー

名前 説明
Authorization ベアラー {トークン}。必須。
Content-type application/json. Required.
User-Agent 呼び出し元のアプリケーションの名前とバージョンについて説明します。 詳細は Azure Information Protection Analytics に表示されます。 推奨される形式は ApplicationName/Version です。 省略可能。

要求本文

要求本文で、次のパラメーターを含む JSON オブジェクトを指定します。

パラメーター 説明
contentInfo contentInfo キーと値のペアとしてのコンテンツ形式、コンテンツの状態、および既存の メタデータ に関する詳細を提供します。
classificationResults classificationResult コレクション データ分類エンドポイントによって返される分類結果のセットが含まれます。 分類情報は、Office 365 セキュリティおよびコンプライアンス センターの Microsoft Purview Information Protection ポリシー ラベル構成に基づいて適切なラベルを決定するために使用されます。

応答

成功した場合、このメソッドは 200 OK 応答コードと応答本文に新しい informationProtectionAction コレクション オブジェクトを返します。

次の例は、この API を呼び出す方法を示しています。

要求

要求の例を次に示します。

POST https://graph.microsoft.com/beta/informationProtection/policy/labels/evaluateClassificationResults
Content-type: application/json
User-agent: ContosoLOBApp/1.0

{
  "contentInfo": {
    "@odata.type": "#microsoft.graph.contentInfo",
    "format@odata.type": "#microsoft.graph.contentFormat",
    "format": "default",
    "identifier": null,
    "state@odata.type": "#microsoft.graph.contentState",
    "state": "rest"
  },
  "classificationResults": [
    {
      "sensitiveTypeId": "cb353f78-2b72-4c3c-8827-92ebe4f69fdf",
      "count": 4,
      "confidenceLevel": 75
    }
  ]
}

応答

応答の例を次に示します。

注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。

HTTP/1.1 200 OK
Content-type: application/json

{
  "@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(microsoft.graph.informationProtectionAction)",
  "value": [
    {
      "@odata.type": "#microsoft.graph.applyLabelAction",
      "responsibleSensitiveTypeIds": [
        "cb353f78-2b72-4c3c-8827-92ebe4f69fdf"
      ],
      "actionSource": "automatic",
      "label": {
        "id": "722a5300-ac39-4c9a-88e3-f54c46676417",
        "name": "Top Secret",
        "description": "",
        "color": "#000000",
        "sensitivity": 13,
        "tooltip": "This information is Top Secret.",
        "isActive": true
      },
      "actions": [
        {
          "@odata.type": "#microsoft.graph.protectByTemplateAction",
          "templateId": "0e7fea72-7bba-4438-a070-95c292cd6f8c"
        },
        {
          "@odata.type": "#microsoft.graph.metadataAction",
          "metadataToRemove": [],
          "metadataToAdd": [
            {
              "name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Enabled",
              "value": "true"
            },
            {
              "name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SetDate",
              "value": "2019-10-03T21:50:20Z"
            },
            {
              "name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Method",
              "value": "Standard"
            },
            {
              "name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Name",
              "value": "Top Secret"
            },
            {
              "name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SiteId",
              "value": "cb46c030-1825-4e81-a295-151c039dbf02"
            },
            {
              "name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ActionId",
              "value": "76dc494e-6c59-43e6-88a1-0000edd58fca"
            },
            {
              "name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ContentBits",
              "value": "8"
            }
          ]
        }
      ]
    }
  ]
}