Skip to content

Skip AcquireTokenWithMtlsPop test: AAD westus3 test slice returns Bearer - #3892

Merged
neha-bhargava merged 1 commit into
masterfrom
nebharg/skip-mtls-pop-westus3-test-slice
Jun 23, 2026
Merged

Skip AcquireTokenWithMtlsPop test: AAD westus3 test slice returns Bearer#3892
neha-bhargava merged 1 commit into
masterfrom
nebharg/skip-mtls-pop-westus3-test-slice

Conversation

@neha-bhargava

Copy link
Copy Markdown
Contributor

Problem

The E2E test AcquireTokenWithMtlsPop_WithBindingCertificate_ReturnsMtlsPopToken (tests/E2E Tests/TokenAcquirerTests/TokenAcquirer.cs) is failing on the PR pipeline with:

MsalClientException: You asked for token type mtls_pop, but receive Bearer.

Investigation

Reproduced and root-caused while debugging the same failure in MSAL.NET (AzureAD/microsoft-authentication-library-for-dotnet#6084):

Endpoint Result
westus3.mtlsauth.microsoft.com (test slice — used by this test) ❌ AAD returns Bearer
mtlsauth.microsoft.com (global — used by a sibling MSAL.NET test) ✅ Passes

MSAL is correctly routing to the regional mtlsauth endpoint, sending token_type=mtls_pop, and presenting the SNI cert. The AAD westus3 test slice is silently downgrading the response. This is not a Microsoft.Identity.Web or MSAL regression.

Fix

Skip the test via [Fact(Skip = ""..."")] — the repo's established pattern for known-broken external-dependency tests (see e.g. WebAppIntegrationTests.cs, TokenAcquirer.cs:268, CertificateRotationTest.cs:45). Remove the skip when AAD test slice is fixed.

Tracking

The E2E test AcquireTokenWithMtlsPop_WithBindingCertificate_ReturnsMtlsPopToken
fails consistently in the PR pipeline with:

  MsalClientException: You asked for token type mtls_pop, but receive Bearer.

Root cause is server-side: the AAD westus3 test-slice mtlsauth endpoint
is downgrading token_type=mtls_pop responses to Bearer. MSAL is
correctly routing to westus3.mtlsauth.microsoft.com, sending
token_type=mtls_pop, and presenting the SNI cert. The matching MSAL.NET
test against the global mtlsauth.microsoft.com endpoint continues to
pass, isolating the issue to the test slice — not a Microsoft.Identity.Web
or MSAL regression.

Skip the test via [Fact(Skip = "...")] (the repo's established pattern
for known-broken external-dependency tests) until the AAD test slice
honors token_type=mtls_pop again.

Tracking: #3891
Related: AzureAD/microsoft-authentication-library-for-dotnet#6084

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@neha-bhargava
neha-bhargava requested a review from a team as a code owner June 23, 2026 18:06
@neha-bhargava
neha-bhargava merged commit 72f20d1 into master Jun 23, 2026
4 checks passed
@neha-bhargava
neha-bhargava deleted the nebharg/skip-mtls-pop-westus3-test-slice branch June 23, 2026 18:30
This was referenced Jun 24, 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.

3 participants