Skip to content

Commit 212c1fb

Browse files
authored
Fix 2912 (#2913) (#2914)
1 parent e3a059f commit 212c1fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.Identity.Web.TokenAcquisition/DefaultAuthorizationHeaderProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public async Task<string> CreateAuthorizationHeaderAsync(
6969
// await authorizationHeaderProvider.CreateAuthorizationHeaderAsync(
7070
// new [] { "https://graph.microsoft.com/.default" },
7171
// new AuthorizationHeaderProviderOptions { RequestAppToken = true }).ConfigureAwait(false);
72-
if (downstreamApiOptions != null && downstreamApiOptions.RequestAppToken)
72+
if (downstreamApiOptions != null && (downstreamApiOptions.RequestAppToken || downstreamApiOptions.AcquireTokenOptions?.ManagedIdentity != null))
7373
{
7474
result = await _tokenAcquisition.GetAuthenticationResultForAppAsync(
7575
scopes.FirstOrDefault()!,

0 commit comments

Comments
 (0)