Microsoft Entra ID Governance
Governance

Quickstart: Assign and test a built-in Microsoft Entra resource policy (preview)

In brief

The documentation explains how to assign a built-in resource policy in report-only mode and test simulated compliant and noncompliant requests using Microsoft Graph Explorer, without creating applications or writing Rego.

What Entra admins need to know

Administrators can safely evaluate policy decisions in a test tenant before enforcing requests. The quickstart requires the Resource Policy Administrator role and delegated Graph Explorer consent.

This editorial summary was generated by AI from the documentation changes. Verify important details in the full Microsoft Learn article.

Documentation change

The comparison below shows only the changed extract. Use the full-page view for complete context.

new file mode 100644

title: "Quickstart: Assign and test a built-in Microsoft Entra resource policy (preview)" description: Assign a built-in resource policy in report-only mode and compare simulated compliant and noncompliant requests without creating applications. ms.topic: quickstart ms.date: 11/11/2026 ai-usage: ai-generated # Customer intent: As a tenant administrator, I want to assign and test a built-in policy so that I can understand its decisions without writing Rego or creating applications.

Quickstart: Assign and test a built-in Microsoft Entra resource policy (preview)

Use the Microsoft Entra admin center to assign a built-in resource policy in report-only mode and Microsoft Graph Explorer to test its decisions with simulated requests. You don't need to write a policy, create applications, or enable enforcement.

Prerequisites

  • An approved test environment.
  • A Microsoft Entra ID Governance service plan to create and activate the assignment, including report-only assignments. See licensing requirements.
  • One work or school account in the test tenant. Use this same account and tenant in the Microsoft Entra admin center and Microsoft Graph Explorer throughout the quickstart, including cleanup.

Microsoft Entra roles for your account

Use an active Resource Policy Administrator role to create and delete the assignment and evaluate assigned policies.

If the role is eligible through Privileged Identity Management (PIM), activate it before starting.

Delegated permissions for Microsoft Graph Explorer

Before starting, have an administrator grant consent in the test tenant for Microsoft Graph Explorer's delegatedResourcePolicyEvaluation.Read.All permission. This permission lets you run evaluateAssignedPolicies without performing the proposed write.

Assignment creation and cleanup use the Microsoft Entra admin center, so you don't need to grant Graph Explorer assignment-management permissions.

1. Select a built-in policy and assign it in your tenant

Use the Require a department prefix for application names built-in policy. This policy requires application names to use an allowed department prefix and contain no banned words.

  1. Sign in to the Microsoft Entra admin center with the test-tenant account described in Prerequisites.

  2. Browse to Tenant governance > Definitions.

  3. On the Built in tab, find the Require a department prefix for application names policy definition and review the description.

  4. Select Add assignment on the chosen policy definition.

  5. On Settings, use assignment identifier enforce_application_name_prefix and policy version 1.0.0. Set Status to On and Enforcement to Report-only. Leave other properties at their defaults.

  6. On Parameters, select Edit allowed_departments and enter the following case-sensitive prefixes, one value per row:

    • Engineering-
    • Marketing-
    • IT-
    • HR-
    • Finance-
    • Sales-

    Use Add row for the additional Sales- value, then select Apply. Leave banned_word_list and client_appid_exclusion_list empty.

  7. On Review, review the summary and add the assignment.

On enables evaluation; Report-only records results without blocking requests through this assignment.

2. Validate without performing a write

Use evaluateAssignedPolicies in Graph Explorer to compare names with and without an allowed prefix, without creating applications. The action evaluates all applicable assignments, so find enforce_application_name_prefix in details to identify this quickstart's results.

The evaluation action reflects saved assignment settings without waiting for changes to propagate to real requests.

Sign in to Microsoft Graph Explorer with the same account and tenant you used in the Microsoft Entra admin center. Confirm that Graph Explorer has the delegated permissions listed in Prerequisites.

Check a noncompliant application name

Use Inventory-Taker, which doesn't start with any of the configured department prefixes.

  1. In Microsoft Graph Explorer, select POST and beta.

  2. Enter the following request URL:

    https://graph.microsoft.com/beta/admin/resourcePolicy/evaluateAssignedPolicies
    
  3. Select Request Body and enter the following JSON:

    {
      "resourceUri": "/beta/applications",
      "httpMethod": "post",
      "resourceBody": {
        "displayName": "Inventory-Taker"
      },
      "scope": "/",
      "isResultDetailed": true
    }
    
  4. Select Run query.

  5. In Response preview, inspect the evaluation result. Select Expand if you need more space.

With this report-only assignment, expect 200 OK and the following fields:

FieldValue
appliedPoliciesEffectsdeny
isBlockedfalse
details[].assignmentUniqueNameenforce_application_name_prefix
details[].assignedPolicyDisplayNameRequire a department prefix for application names
details[].appliedPolicyEffectsdeny

The matching entry in details includes this reason:

The application name needs an allowed department prefix. Add a prefix from allowed_departments, then try again.

200 OK means the evaluation completed, not that the name is compliant. The deny effect identifies the violation; isBlocked: false reflects report-only mode. Other applicable assignments can affect the overall result.

Check a compliant application name

Use Sales-Inventory-Taker, which starts with the configured Sales- prefix.

  1. Keep POST, beta, and the same evaluation request URL.
  2. In Request Body, change only displayName from Inventory-Taker to Sales-Inventory-Taker. Keep all other values unchanged.
  3. Select Run query.
  4. In Response preview, find the result for enforce_application_name_prefix.

With this configuration, expect 200 OK and the following fields:

FieldValue
appliedPoliciesEffectscompliant
isBlockedfalse
details[].assignmentUniqueNameenforce_application_name_prefix
details[].appliedPolicyEffectscompliant

The response message is:

Resource is compliant with assigned policies.

Both examples return isBlocked: false. Compare the policy effects to distinguish compliance from a report-only violation.

3. Clean up or continue

To continue with the tutorial, keep enforce_application_name_prefixOn and Report-only, with its version and parameters unchanged. Skip deletion.

If you're stopping here, delete the assignment. The simulated tests created no applications to clean up.

  1. Browse to Tenant governance > Assignments.
  2. Select the checkbox for enforce_application_name_prefix. Confirm that only the intended assignment is selected, including any selections hidden by the current filter.
  3. Select Delete.
  4. In Remove assignment?, confirm Selected items: 1., then select Delete.

Deleting the assignment stops it from applying the policy and moves it to Deleted items. You can restore it for 30 days.

Next steps

Follow Tutorial: Observe and enforce a built-in resource policy to test real requests, inspect audit events, enable enforcement, and verify recovery.

Related content

Daily Entra.News

Get daily email updates

Get a concise summary of the latest Microsoft Entra updates delivered straight to your inbox.

Loading the secure signup form…