Skip to content

Commit 53da7c3

Browse files
andkorshbgavrilMS
andauthored
#5400 Fixing issue that leads to multiple active access tokens in the cache for non-tenanted oidc authority (#5401)
Co-authored-by: Andrew Korshunov <andrew.korshunov@harmonic.ky> Co-authored-by: Bogdan Gavril <bogavril@microsoft.com>
1 parent adeb819 commit 53da7c3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/client/Microsoft.Identity.Client/TokenCache.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ private void DeleteAccessTokensWithIntersectingScopes(
138138
if (accessToken.ClientId.Equals(ClientId, StringComparison.OrdinalIgnoreCase) &&
139139
environmentAliases.Contains(accessToken.Environment) &&
140140
string.Equals(accessToken.TokenType ?? "", tokenType ?? "", StringComparison.OrdinalIgnoreCase) &&
141-
string.Equals(accessToken.TenantId, tenantId, StringComparison.OrdinalIgnoreCase) &&
141+
string.Equals(accessToken.TenantId ?? "", tenantId ?? "", StringComparison.OrdinalIgnoreCase) &&
142142
accessToken.ScopeSet.Overlaps(scopeSet))
143143
{
144144
requestParams.RequestContext.Logger.Verbose(() => $"Intersecting scopes found: {scopeSet}");

0 commit comments

Comments
 (0)