Skip to content

Comments

add information to policy structure page regarding usage of requestCo…#128223

Open
hribeiro-msft wants to merge 1 commit intoMicrosoftDocs:mainfrom
hribeiro-msft:main
Open

add information to policy structure page regarding usage of requestCo…#128223
hribeiro-msft wants to merge 1 commit intoMicrosoftDocs:mainfrom
hribeiro-msft:main

Conversation

@hribeiro-msft
Copy link

…ntext.identity

Add information to policy blade regarding one of the caveats of using the function requestContext().identity.

…ntext.identity

Add information to policy blade regarding one of the caveats of using the function requestContext().identity.
@prmerger-automator
Copy link
Contributor

@hribeiro-msft : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit ec2e732:

✅ Validation status: passed

File Status Preview URL Details
articles/governance/policy/concepts/definition-structure-policy-rule.md ✅Succeeded

For more details, please refer to the build report.

@ttorble ttorble requested a review from Copilot February 20, 2026 16:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a documentation warning to the policy rule structure page describing a caveat when using requestContext().identity, specifically its impact on compliance scans/visibility.

Changes:

  • Added an [!WARNING] note about requestContext().identity affecting scan applicability
  • Clarified that effects can still be applied even when compliance isn’t shown

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

```

> [!WARNING]
> When using the requestContext().identity function the policy engine will mark the policy as not applicable for scans. Meaning that no compliance will be visible but effects like deny/DeployIfNotExists/Modify will still be applied.
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This warning is helpful but reads ambiguously and could be misinterpreted. Consider tightening terminology and formatting: wrap the function and effect names in code formatting (e.g., requestContext().identity, Deny, DeployIfNotExists, Modify), clarify what “scans” refers to (e.g., compliance evaluation/scans), and rephrase the second sentence to avoid the fragment starting with “Meaning that…”. Also, “no compliance will be visible” could be clarified as compliance results showing NotApplicable (or similar) rather than implying policy enforcement stops.

Suggested change
> When using the requestContext().identity function the policy engine will mark the policy as not applicable for scans. Meaning that no compliance will be visible but effects like deny/DeployIfNotExists/Modify will still be applied.
> When you use the `requestContext().identity` function, the policy engine marks the policy as `NotApplicable` for compliance evaluation/scans. As a result, compliance results for that policy show as `NotApplicable`, but enforcement of effects such as `Deny`, `DeployIfNotExists`, and `Modify` still occurs at request time.

Copilot uses AI. Check for mistakes.
@ttorble
Copy link
Contributor

ttorble commented Feb 20, 2026

@rmcmurray

Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator bot added the aq-pr-triaged tracking label for the PR review team label Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants