Skip to content

Commit 43c5799

Browse files
authored
Merge pull request #128223 from hribeiro-msft/main
add information to policy structure page regarding usage of requestCo…
2 parents 6251957 + b85879c commit 43c5799

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

articles/governance/policy/concepts/definition-structure-policy-rule.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -665,10 +665,15 @@ The following functions are only available in policy rules:
665665
```
666666

667667
- `http: //schemas.microsoft.com/identity/claims/objectidentifier`: returns the user (or object) ID associated with the request.
668-
```json
669-
"value": "[tryGet(requestContext().identity, 'http: //schemas.microsoft.com/identity/claims/objectidentifier')]",
670-
"in": ['userId']
671-
```
668+
```json
669+
"value": "[tryGet(requestContext().identity, 'http: //schemas.microsoft.com/identity/claims/objectidentifier')]",
670+
"in": ['userId']
671+
```
672+
673+
> [!WARNING]
674+
> 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.
675+
676+
672677
- `policy()`
673678
- Returns the following information about the policy that is being evaluated. Properties can be accessed from the returned object (example: `[policy().assignmentId]`).
674679

0 commit comments

Comments
 (0)