Skip to content

Commit

Permalink
use domain hint for tenant Id, per request from MyApps during redemti…
Browse files Browse the repository at this point in the history
…on of code (#2067)
  • Loading branch information
jennyf19 authored Feb 3, 2023
1 parent f740377 commit 3599bcb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Microsoft.Identity.Web/TokenAcquisition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ public async Task AddAccountToCacheFromAuthorizationCodeAsync(
.WithCcsRoutingHint(backUpAuthRoutingHint)
.WithSpaAuthorizationCode(mergedOptions.WithSpaAuthCode);

if (!string.IsNullOrEmpty(context.ProtocolMessage.DomainHint))
{
builder.WithTenantId(context.ProtocolMessage.DomainHint);
}

if (mergedOptions.IsB2C)
{
string? userFlow = context.Principal?.GetUserFlowId();
Expand Down

0 comments on commit 3599bcb

Please sign in to comment.