Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
64e1769
feat: extend mTLS bearer transport to OBO, refresh_token, and auth_co…
Robbie-Microsoft May 14, 2026
c2451d9
fix: remove ClassCleanup disposal of shared CertHelper cert
Robbie-Microsoft May 14, 2026
f37ce63
test: address Copilot review comments
Robbie-Microsoft May 14, 2026
596654c
test: fix typo and clarify client_assertion_type comment
Robbie-Microsoft May 14, 2026
774a1df
test: address review feedback - real integration tests, remove Silent…
Robbie-Microsoft May 19, 2026
7617782
Add OboFlow_WithClientSecret_BaselineAsync to complete Bogdan's 2x2 t…
Robbie-Microsoft May 20, 2026
c86dacc
fix: Bug #1 and Bug #2 for mTLS bearer user flows
Robbie-Microsoft May 21, 2026
b7059f2
Merge branch 'main' of https://github.com/AzureAD/microsoft-authentic…
Robbie-Microsoft May 21, 2026
b855aa7
Guard Case 2 in TryInitImplicitBearerOverMtlsAsync behind SendCertifi…
Robbie-Microsoft May 21, 2026
c67b809
Replace WithClientSecret baseline with negative test; add auth_code x…
Robbie-Microsoft May 21, 2026
51c16c8
docs: remove internal ESTS team language from mtls-bearer-transport.md
Robbie-Microsoft May 21, 2026
2932f1f
fix(mtls): send client_assertion on all flows including S2S
Robbie-Microsoft May 22, 2026
90b2cef
fix: address Copilot review comments
Robbie-Microsoft May 22, 2026
1c10e46
fix: address Copilot review comments round 2
Robbie-Microsoft May 22, 2026
12b9984
fix: restore WithCachePartitionKey and WithReservedScopes APIs from main
Robbie-Microsoft May 22, 2026
3df65bd
fix: restore SendOfflineAccessScope property and PublicAPI entries fr…
Robbie-Microsoft May 22, 2026
dddbf3d
fix: restore SendOfflineAccessScope in TokenClient and Authentication…
Robbie-Microsoft May 22, 2026
e54af78
fix: address Copilot review comments round 3
Robbie-Microsoft May 22, 2026
26250d2
fix: remove SendCertificateOverMtls guard from Case 2 in TryInitImpli…
Robbie-Microsoft May 22, 2026
35cc594
docs: clarify Case 2 double-invocation pattern in MtlsPopParametersIn…
Robbie-Microsoft May 22, 2026
7568b36
fix: auto-enable SendX5C when SendCertificateOverMtls=true for SNI ap…
Robbie-Microsoft May 22, 2026
2b351fc
test: [Ignore] OboFlow and RefreshTokenFlow blocked integration tests…
Robbie-Microsoft May 22, 2026
7e9ab79
test: strengthen regional OBO test assertions in ExpectedPostData
Robbie-Microsoft May 22, 2026
64e1040
Merge branch 'main' into rginsburg/mtls_bearer_user_flows
Robbie-Microsoft May 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ public async Task<AuthenticationResult> ExecuteAsync(
AcquireTokenByRefreshTokenParameters refreshTokenParameters,
CancellationToken cancellationToken)
{
await commonParameters.TryInitMtlsPopParametersAsync(ServiceBundle, cancellationToken)
.ConfigureAwait(false);

var requestContext = CreateRequestContextAndLogVersionInfo(commonParameters.CorrelationId, commonParameters.MtlsCertificate, cancellationToken);
if (commonParameters.Scopes == null || !commonParameters.Scopes.Any())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public async Task<AuthenticationResult> ExecuteAsync(
AcquireTokenByAuthorizationCodeParameters authorizationCodeParameters,
CancellationToken cancellationToken)
{
await commonParameters.TryInitMtlsPopParametersAsync(ServiceBundle, cancellationToken)
.ConfigureAwait(false);
Comment thread
Robbie-Microsoft marked this conversation as resolved.

RequestContext requestContext = CreateRequestContextAndLogVersionInfo(commonParameters.CorrelationId, commonParameters.MtlsCertificate, cancellationToken);

AuthenticationRequestParameters requestParams = await _confidentialClientApplication.CreateRequestParametersAsync(
Expand Down Expand Up @@ -85,6 +88,9 @@ public async Task<AuthenticationResult> ExecuteAsync(
AcquireTokenOnBehalfOfParameters onBehalfOfParameters,
CancellationToken cancellationToken)
{
await commonParameters.TryInitMtlsPopParametersAsync(ServiceBundle, cancellationToken)
.ConfigureAwait(false);

RequestContext requestContext = CreateRequestContextAndLogVersionInfo(commonParameters.CorrelationId, commonParameters.MtlsCertificate, cancellationToken);

AuthenticationRequestParameters requestParams = await _confidentialClientApplication.CreateRequestParametersAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,15 @@ public async Task<InstanceDiscoveryMetadataEntry> GetMetadataAsync(Uri authority
string region = null;
bool isMtlsEnabled = requestContext.IsMtlsRequested;

if (requestContext.ApiEvent?.ApiId == TelemetryCore.Internal.Events.ApiEvent.ApiIds.AcquireTokenForClient)
// Always attempt region discovery for AcquireTokenForClient.
// Also attempt it for mTLS-enabled user flows when the app has opted in to
// regional endpoints (AzureRegion != null), so that OBO/RT can use a regional
// mTLS endpoint (e.g. eastus.mtlsauth.microsoft.com) when configured.
bool shouldAttemptRegionDiscovery =
requestContext.ApiEvent?.ApiId == TelemetryCore.Internal.Events.ApiEvent.ApiIds.AcquireTokenForClient ||
(isMtlsEnabled && requestContext.ServiceBundle.Config.AzureRegion != null);

if (shouldAttemptRegionDiscovery)
{
region = await _regionManager.GetAzureRegionAsync(requestContext).ConfigureAwait(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1183,8 +1183,14 @@ private async Task<IDictionary<string, TenantProfile>> GetTenantProfilesAsync(
idTokenCacheItems.Select(aci => aci.Environment),
StringComparer.OrdinalIgnoreCase);

// Use OriginalAuthority for alias resolution so that mTLS-transformed authorities
// (mtlsauth.microsoft.com) don't propagate into the cache lookup.
// _currentAuthority may be set to the mTLS endpoint (PreferredNetwork) after instance
// discovery; using OriginalAuthority ensures we always look up aliases from the
// canonical login.* host, which is where id tokens are stored.
var authorityInfoForAliases = requestParameters.AuthorityManager.OriginalAuthority.AuthorityInfo;
InstanceDiscoveryMetadataEntry instanceMetadata = await ServiceBundle.InstanceDiscoveryManager.GetMetadataEntryTryAvoidNetworkAsync(
requestParameters.AuthorityInfo,
authorityInfoForAliases,
allEnvironmentsInCache,
requestParameters.RequestContext).ConfigureAwait(false);
Comment thread
Robbie-Microsoft marked this conversation as resolved.

Expand Down
Loading
Loading