{AKS} Specify principal type in Web App Routing live test - #10263
Merged
Julie Zhu (yanzhudd) merged 1 commit intoSep 1, 2026
Merged
Conversation
Create the managed-identity role assignment by object ID with an explicit ServicePrincipal type so PIM Only Mode does not rely on Microsoft Graph inference. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Hi FumingZhang, |
microsoft-github-policy-service
Bot
requested review from
Julie Zhu (yanzhudd) and
Yong Zhang (yonzhan)
August 27, 2026 05:48
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the AKS Preview live test for Web App Routing so RBAC role assignment creation is explicit about the assignee’s identity type, avoiding Microsoft Graph principal-type inference in app-only environments.
Changes:
- Switches the test’s
az role assignment createinvocation from--assigneeto--assignee-object-id. - Adds
--assignee-principal-type ServicePrincipalto ensureprincipalTypeis included in the request (PIM Only Mode compliant).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
4 tasks
Collaborator
|
AKS |
Julie Zhu (yanzhudd)
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 PR Validation — ️✔️ All clear
Related command
az role assignment createintest_aks_create_and_update_web_application_routing_dns_zoneDescription
The Web App Routing live test creates a DNS Zone Contributor assignment for a managed identity by passing its object ID through
--assignee. Azure CLI then attempts to query Microsoft Graph to infer the principal type. In app-only environments without Graph directory permissions, the GUID fallback leaves the type unset and omitsprincipalTypefrom the role-assignment request.Use
--assignee-object-idwith--assignee-principal-type ServicePrincipalso the request is unambiguous and compliant with PIM Only Mode enforcement without requiring Graph inference.This is a test-only compliance hardening change and does not alter customer-facing
aks-previewbehavior. It was split from #10262 so that the Data Protection product fix and this AKS live-test fix can be reviewed independently.Validation
azdev style aks-preview --pep8 --pylintpython -m py_compile src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.pypython scripts/ci/test_index.py -q— 9 passed, 2 skippedThe live scenario was not run because it provisions an AKS cluster and DNS resources. No extension version bump is needed for a test-only change.
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install azdevrequired)For new extensions:
About Extension Publish
This PR changes only a live test, so it intentionally does not change the
aks-previewversion, history, or generated index.