quervernetzt
quervernetzt

Reputation: 11651

Azure Managed Identity: DefaultAzureCredential: Regional Cache Auth Service token requests for flows that require encrypted tokens are forbidden

I have a C# / .NET Core Azure Function with a system managed identity. I want to use this identity to get a token to interact with another service. For this I use DefaultAzureCredential -> GetTokenAsync from Azure.Identity.

But when I try that I get the following error:

ManagedIdentityCredential authentication failed: Service request failed.\nStatus: 400 (Bad Request)\n\nContent:\n{"exceptionMessage":"AADSTS100009: Regional Cache Auth Service token requests for flows that require encrypted tokens are forbidden."

Why is this happening and how can I resolve this issue?

Thanks

Upvotes: 0

Views: 1018

Answers (1)

quervernetzt
quervernetzt

Reputation: 11651

For some reason (maybe someone can explain why) after removing .default from the scope it worked.

Upvotes: 0

Related Questions