Edit

List resourcePolicyDefinition objects

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Get the customer-authored resourcePolicyDefinition objects in the tenant.

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) ResourcePolicyDefinition.Read.All ResourcePolicyDefinition.ReadWrite.All
Delegated (personal Microsoft account) Not supported. Not supported.
Application ResourcePolicyDefinition.Read.All ResourcePolicyDefinition.ReadWrite.All

Important

For delegated access using work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role that grants the permissions required for this operation. Resource Policy Reader is the least privileged role supported for this operation.

HTTP request

GET /admin/resourcePolicy/definitions

Optional query parameters

For a policy definition, this method supports $filter on category and rule/appliesTo/resourceName (eq), and on createdDateTime and lastModifiedDateTime (le, gt). It supports $expand on assignments and previousVersions. For general information, see OData query parameters.

Request headers

Name Description
Accept application/json. Optional. This collection doesn't support text/plain; get an individual definition to retrieve its Rego text.
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body.

Response

If successful, this method returns 200 OK and a collection of resourcePolicyDefinition objects in the response body.

Examples

Request

GET https://graph.microsoft.com/beta/admin/resourcePolicy/definitions

Response

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

{
  "value": [
    {
      "@odata.type": "#microsoft.graph.resourcePolicyDefinition",
      "@odata.etag": "\"972dd856-91ff-4539-be09-50ea8235b76c\"",
      "uniqueName": "require_application_name",
      "createdDateTime": "2026-10-22T12:00:00Z",
      "lastModifiedDateTime": "2026-10-22T12:00:00Z",
      "displayName": "Require an application name",
      "description": "Require applications to have a display name",
      "category": "identityAndTenant",
      "version": "1.0.0",
      "deletedDateTime": null,
      "rule": {
        "appliesTo": {
          "operations": "create,updateOrUpsert",
          "resourceName": "microsoft.graph.application",
          "includeDerivedTypes": true
        },
        "policy": "package graph.require_application_name[\"1.0.0\"]\n\n__metadata__ := {\n  \"title\": \"Require an application name\",\n  \"description\": \"Require applications to have a display name\",\n  \"category\": \"identityAndTenant\",\n  \"selector\": {\n    \"resourceName\": \"microsoft.graph.application\",\n    \"operations\": [\n      \"create\",\n      \"updateOrUpsert\"\n    ]\n  }\n}\n\ndefault deny := {\"result\": false, \"reasons\": []}\n\ndeny := {\"result\": true, \"reasons\": [\"A display name is required.\"]} if {\n  object.get(input.resource, \"displayName\", \"\") == \"\"\n}\n"
      },
      "paramsSchema": null
    }
  ]
}