Skip to content

Test: consolidate MI E2E test onto shared Msal_Integration_tests UAMI#3926

Merged
RyAuld merged 1 commit into
masterfrom
ryauld/e2e-mi-consolidate-msal-integration
Jul 6, 2026
Merged

Test: consolidate MI E2E test onto shared Msal_Integration_tests UAMI#3926
RyAuld merged 1 commit into
masterfrom
ryauld/e2e-mi-consolidate-msal-integration

Conversation

@RyAuld

@RyAuld RyAuld commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What

Switches the AcquireTokenWithManagedIdentity_UserAssignedAsync E2E test (tests/E2E Tests/TokenAcquirerTests/TokenAcquirer.cs) from the single-purpose Id4STesting user-assigned managed identity (clientId 5bcd1685-b002-4fd1-8ebd-1ec3e1e4ca4d) to the shared/consolidated lab UAMI Msal_Integration_tests (clientId 45344e7d-c562-4be6-868f-18dac789c021, RG MSAL_MSI, sub c1686c51-b717-4fe0-9af3-24a20a41fb0c).

Why

  • Id4STesting is a single-purpose identity whose only consumer across all repos is this one test. Consolidating onto the already-shared Msal_Integration_tests UAMI (also used by MSAL.NET E2E tests) lets us retire Id4STesting and reduce identity sprawl.
  • The test only acquires a token for the generic https://vault.azure.net/.default audience and asserts the header is non-empty - it does not read from any specific Key Vault. Token issuance happens at Entra, so no Key Vault permissions are required. Msal_Integration_tests is a permissions superset, so the swap is safe from an authorization standpoint.

Testing

E2E test runs only on the ADO pipeline ([OnlyOnAzureDevopsFact]); validate via the pipeline once the MI is assigned to the agent pool.

… test

Switch AcquireTokenWithManagedIdentity_UserAssignedAsync from the
Id4STesting managed identity (clientId 5bcd1685-...) to the consolidated
lab UAMI Msal_Integration_tests (clientId 45344e7d-...) in resource group
MSAL_MSI. This lets us retire the single-purpose Id4STesting identity and
reuse the shared lab identity already used by MSAL.NET E2E tests.

The test only acquires a token for the https://vault.azure.net audience,
so no Key Vault permissions are required; the new identity is a superset.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@RyAuld
RyAuld requested a review from a team as a code owner July 6, 2026 18:52
@RyAuld
RyAuld merged commit 2c8a9c2 into master Jul 6, 2026
5 checks passed
@RyAuld
RyAuld deleted the ryauld/e2e-mi-consolidate-msal-integration branch July 6, 2026 19:30
This was referenced Jul 10, 2026
This was referenced Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants