To have it as an answer: it seems it only happens when both System Assigned and User Assigned Identity are active. As a temporary workaround removing the User Assigned Identy seems to make it work again.
Container instance with managed identity is not working with storage account and other Azure services
Serhii Divnych
45
Reputation points
Hi. I'm facing issues with container instances for 2 subscriptions in East US. Code deployed to container instance is using managed identity access to storage account, and to Azure AI services multi-service account. Beginning from 9th of March managed identity access stoped working, and container instances are not working getting below errors from logs
Execute threw an unhandled exception.
Azure.Identity.AuthenticationFailedException: ManagedIdentityCredential authentication failed: Service request failed.
Status: 500 (Internal Server Error)
Content:
Received invalid token. Please try again.
Headers:
X-Content-Type-Options: REDACTED
Date: Wed, 12 Mar 2025 11:53:22 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 42
See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/managedidentitycredential/troubleshoot
---> Azure.RequestFailedException: Service request failed.
Status: 500 (Internal Server Error)
Content:
Received invalid token. Please try again.
Headers:
X-Content-Type-Options: REDACTED
Date: Wed, 12 Mar 2025 11:53:22 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 42
at Azure.Identity.ManagedIdentitySource.HandleResponseAsync(Boolean async, TokenRequestContext context, HttpMessage message, CancellationToken cancellationToken)
at Azure.Identity.ImdsManagedIdentitySource.HandleResponseAsync(Boolean async, TokenRequestContext context, HttpMessage message, CancellationToken cancellationToken)
Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
751 questions