Edit

resourcePolicyRoot resource type

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.

Provides access to resource policy definitions, assignments, tenant-wide configuration, deleted items, and policy evaluation under /admin/resourcePolicy.

Resource policies use policy-as-code to evaluate Microsoft Graph resource changes. Define rules in Rego, assign a definition version at tenant scope, and evaluate requests before enabling enforcement. Evaluation and enforcement are distinct: doNotEnforce records outcomes without applying the effect; enforce applies the effect.

Access this container through the resourcePolicy relationship of admin.

Methods

Method Return type Description
List definitions resourcePolicyDefinition collection List customer-authored definitions.
List built-in definitions resourcePolicyDefinition collection List read-only Microsoft-authored definitions.
List assignments resourcePolicyAssignment collection List assignments.
Evaluate assigned policies policiesEvaluationResult Evaluate the applicable assignments for an API request.
Evaluate policy policiesEvaluationResult Evaluate an inline Rego policy for an API request.

Properties

None.

Relationships

Relationship Type Description
assignments resourcePolicyAssignment collection The policy assignments in the tenant.
builtInDefinitions resourcePolicyDefinition collection The read-only Microsoft-authored policy definitions available to the tenant. Built-in definitions and their previous versions can't be created, updated, or deleted by callers.
configuration resourcePolicyConfiguration The tenant-wide resource policy configuration singleton.
definitions resourcePolicyDefinition collection The customer-authored policy definitions.
deletedItems resourcePolicyDeletableRoot The container for deleted definitions and assignments.

JSON representation

The following JSON representation shows the resource type.

{
  "@odata.type": "#microsoft.graph.resourcePolicyRoot"
}