{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-defender/json-schema/microsoft-defender-microsoft-graph-policy-tenant-scope-schema.json",
  "title": "microsoft.graph.policyTenantScope",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-defender-security-tenantdatasecurityandgovernance-api-openapi.yml#/components/schemas/microsoft.graph.policyTenantScope",
  "allOf": [
    {
      "$ref": "#/$defs/microsoft.graph.policyScopeBase"
    },
    {
      "title": "policyTenantScope",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "policyScope": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.policyBinding"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "Specifies the users and groups included in or excluded from this tenant-level policy scope."
        },
        "@odata.type": {
          "type": "string",
          "default": "#microsoft.graph.policyTenantScope"
        }
      }
    }
  ],
  "x-ms-discriminator-value": "#microsoft.graph.policyTenantScope",
  "$defs": {
    "microsoft.graph.dlpAction": {
      "title": "dlpAction",
      "enum": [
        "notifyUser",
        "blockAccess",
        "deviceRestriction",
        "browserRestriction",
        "unknownFutureValue",
        "restrictAccess",
        "generateAlert",
        "generateIncidentReportAction",
        "sPBlockAnonymousAccess",
        "sPRuntimeAccessControl",
        "sPSharingNotifyUser",
        "sPSharingGenerateIncidentReport",
        "restrictWebGrounding",
        "policyTip"
      ],
      "type": "string"
    },
    "microsoft.graph.dlpActionInfo": {
      "title": "dlpActionInfo",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "action": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.dlpAction"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "The type of DLP action. Possible value is restrictAccessAction."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.executionMode": {
      "title": "executionMode",
      "enum": [
        "evaluateInline",
        "evaluateOffline",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.policyBinding": {
      "title": "policyBinding",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "exclusions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.scopeBase"
          },
          "description": "Specifies the users or groups to be explicitly excluded from this policy scope. Can be null or empty."
        },
        "inclusions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.scopeBase"
          },
          "description": "Specifies the users or groups to be included in this policy scope. Often set to tenantScope for 'All users'."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.policyLocation": {
      "title": "policyLocation",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "value": {
          "type": "string",
          "description": "The actual value representing the location. Location value is specific for concretetype of the  policyLocation - policyLocationDomain, policyLocationUrl, or policyLocationApplication (for example, 'contoso.com', 'https://partner.contoso.com/upload', '83ef198a-0396-4893-9d4f-d36efbffcaaa')."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.policyScopeBase": {
      "title": "policyScopeBase",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "activities": {
          "$ref": "#/$defs/microsoft.graph.userActivityTypes"
        },
        "executionMode": {
          "$ref": "#/$defs/microsoft.graph.executionMode"
        },
        "locations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.policyLocation"
          },
          "description": "The locations (like domains or URLs) to be protected. Required."
        },
        "policyActions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.dlpActionInfo"
          },
          "description": "The enforcement actions to take if the policy conditions are met within this scope. Required."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.scopeBase": {
      "title": "scopeBase",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "identity": {
          "type": [
            "string",
            "null"
          ],
          "description": "The identifier for the scope. This could be a user ID, group ID, or a keyword like 'All' for tenant scope."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.userActivityTypes": {
      "title": "userActivityTypes",
      "enum": [
        "none",
        "uploadText",
        "uploadFile",
        "downloadText",
        "downloadFile",
        "unknownFutureValue",
        "copyToClipboard",
        "pasteFromClipboard",
        "print",
        "accessDebugTools"
      ],
      "type": "string",
      "x-ms-enum-flags": {
        "isFlags": true
      }
    }
  }
}