-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure.Identity issue with Container Apps #325
Comments
@stephaneey Did you try to provide a connection string that specifies the user assigned identity? See https://docs.microsoft.com/en-us/dotnet/api/overview/azure/service-to-service-authentication#connection-string-support |
Hi Anthony, Thanks for your answer. It works when adding the connectionstring. I still wonder why the other method (parameterless contructor) works well in both ACI and AKS but not in ACA. Best Regards |
@stephaneey ACI and AKS will automatically select a user-assigned identity for you when you don't specify a client ID. Unfortunately, that can lead to unexpected results, like causing your application to break just by assigning another identity to it. In Container Apps, we require you to be explicit about which user-assigned identity you want to use, guaranteeing that your application will not spontaneously break in the future if you assign another identity to it. |
Hi @vturecek, Ok thanks for the clarification. Best Regards |
just an fyi, since the title contains If you want to use ACA with user-assigned identities and the You can then use Here's some references:
I implemented this in my ACA template here: |
This issue is a: (mark with an x)
Issue description
Hello, not sure whether this is the right place to report this problem. Trying to leverage a user-assigned identity from the application code results in a failure (system-assigned identity works fine).
Steps to reproduct
The exact same code works fine with Azure Container Instances and with AKS (providing you also deploy the AzureIdentity & the AzureIdentityBinding). I'm using the latest version (1.6.2) of the Microsoft.Azure.Services.AppAuthentication NuGet package. This might be a SDK issue but not sure.
Expected behavior [What you expected to happen.]
A token should be returned
Actual behavior [What actually happened.]
Connection String: [No connection string specified], Resource: https://management.azure.com/, Authority: . Exception Message: Tried the following 3 methods to get an access token, but none of them worked.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Ex. Did this issue occur in the CLI or the Portal?
The text was updated successfully, but these errors were encountered: