Skip to content

Commit 6151a62

Browse files
committed
Fix for #2893 - do not attempt WorkloadIdentityCredential for MSI FIC
1 parent e142ef9 commit 6151a62

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/Microsoft.Identity.Web.Certificateless/ManagedIdentityClientAssertion.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,7 @@ public class ManagedIdentityClientAssertion : ClientAssertionProviderBase
2323
/// <param name="managedIdentityClientId">Optional ClientId of the Managed Identity or Workload Identity</param>
2424
public ManagedIdentityClientAssertion(string? managedIdentityClientId)
2525
{
26-
_credential = new DefaultAzureCredential(
27-
new DefaultAzureCredentialOptions
28-
{
29-
ManagedIdentityClientId = managedIdentityClientId,
30-
WorkloadIdentityClientId = managedIdentityClientId,
31-
ExcludeAzureCliCredential = true,
32-
ExcludeAzureDeveloperCliCredential = true,
33-
ExcludeAzurePowerShellCredential = true,
34-
ExcludeInteractiveBrowserCredential = true,
35-
ExcludeSharedTokenCacheCredential = true,
36-
ExcludeVisualStudioCodeCredential = true,
37-
ExcludeVisualStudioCredential = true
38-
});
26+
_credential = new ManagedIdentityCredential(managedIdentityClientId);
3927
_tokenExchangeUrl = CertificatelessConstants.DefaultTokenExchangeUrl;
4028
}
4129

0 commit comments

Comments
 (0)