Skip to content

AI 61013 - Identity governance for agents — sponsors assigned, entitlement-management channel exists, and lifecycle automation in place#1240

Merged
astaykov merged 5 commits into
devfrom
Feature-61013
May 27, 2026
Merged

AI 61013 - Identity governance for agents — sponsors assigned, entitlement-management channel exists, and lifecycle automation in place#1240
astaykov merged 5 commits into
devfrom
Feature-61013

Conversation

@ashwinikarke
Copy link
Copy Markdown
Collaborator

No description provided.

@ashwinikarke ashwinikarke requested a review from Copilot May 26, 2026 06:09
@ashwinikarke ashwinikarke self-assigned this May 26, 2026
@ashwinikarke ashwinikarke marked this pull request as draft May 26, 2026 06:09
Copy link
Copy Markdown
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 new AI pillar assessment (61013) to evaluate Microsoft Entra Agent ID identity governance readiness by validating agent sponsorship coverage, presence of entitlement-management policies targeting agent identities, and lifecycle workflow automation for sponsorship changes.

Changes:

  • Introduces Test-Assessment-61013 PowerShell test implementing the three sub-conditions and detailed markdown reporting.
  • Adds the accompanying markdown guidance/remediation content for assessment 61013.
  • Updates the global Graph scopes list to include a lifecycle workflows permission.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/powershell/tests/Test-Assessment.61013.ps1 New assessment logic and reporting for agent identity governance (sponsors, access packages, lifecycle workflows).
src/powershell/tests/Test-Assessment.61013.md New end-user guidance/remediation text for assessment 61013 results.
src/powershell/public/Get-ZtGraphScope.ps1 Adds a lifecycle workflows permission to the assessment’s required Graph scopes list.

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

Comment thread src/powershell/public/Get-ZtGraphScope.ps1
Comment thread src/powershell/tests/Test-Assessment.61013.ps1
Comment thread src/powershell/tests/Test-Assessment.61013.md
@ashwinikarke ashwinikarke marked this pull request as ready for review May 26, 2026 08:23
@ashwinikarke ashwinikarke requested a review from alexandair May 26, 2026 08:23
@ashwinikarke ashwinikarke added the ready for review PR is ready for review and merging label May 26, 2026
Copy link
Copy Markdown
Contributor

@alexandair alexandair left a comment

Choose a reason for hiding this comment

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

@ashwinikarke Please, address my feedback.

Comment thread src/powershell/tests/Test-Assessment.61013.ps1 Outdated
$agentTargetingPolicies = @()
Write-ZtProgress -Activity $activity -Status 'Getting entitlement management assignment policies (Q4)'
try {
$agentTargetingPolicies = @(Invoke-ZtGraphRequest `
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The spec is explicit (Q4 section):

"The value allDirectoryAgentIdentities is the beta enum value... not yet exposed on the v1.0 enum. Q4 and Q5 therefore target /beta/identityGovernance/entitlementManagement/... intentionally."

(They provide v1.0 endpoint. :( However, we use beta endpoint everywhere.)

The code calls the endpoint without specifying an API version — defaulting to v1.0 per every other test in this repo that calls assignmentPolicies:

# CURRENT (WRONG) — no -ApiVersion, defaults to v1.0
$agentTargetingPolicies = @(Invoke-ZtGraphRequest `
    -RelativeUri 'identityGovernance/entitlementManagement/assignmentPolicies' `
    -QueryParameters @{ '$select' = 'id,displayName,allowedTargetScope'; '$expand' = 'accessPackage'; '$filter' = "allowedTargetScope eq 'allDirectoryAgentIdentities'" } `
    -ErrorAction Stop)
# CORRECT — must add -ApiVersion beta
$agentTargetingPolicies = @(Invoke-ZtGraphRequest `
    -RelativeUri 'identityGovernance/entitlementManagement/assignmentPolicies' `
    -ApiVersion beta `
    -QueryParameters @{ '$select' = 'id,displayName,allowedTargetScope'; '$expand' = 'accessPackage'; '$filter' = "allowedTargetScope eq 'allDirectoryAgentIdentities'" } `
    -ErrorAction Stop)

The code comment on this block also incorrectly says v1.0, server-side filtered — this needs to be corrected to beta.

Comment thread src/powershell/tests/Test-Assessment.61013.ps1
@ashwinikarke ashwinikarke requested a review from alexandair May 26, 2026 17:14
Copy link
Copy Markdown
Contributor

@alexandair alexandair left a comment

Choose a reason for hiding this comment

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

LGTM

@astaykov astaykov merged commit 2b8dadf into dev May 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review PR is ready for review and merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants