Open amirj opened 1 week ago
The app uses Managed identity with user-assigned identity for the Azure Container App, and infra/main.bicep sets all the roles so that the Container App has all the access needed for the services. No secret is needed when using managed identity on an Azure host like App Service or Container Apps. If you deploy with "azd up", all of the roles and identities should have been set up for you. If you did not, you'll need to check the Bicep and ensure that you have the same identities and role setup.
My app is running perfectly locally and communicate with Azure resources but the deployed app is having the following exception once generating the answer:
I'm sure that the provided AZURE_CLIENT_ID has access to my search service with role AI Search Contributor and Search Index Data Contributor.
Looking at the app code it seems that it's only using AZURE_CLIENT_ID without any secret? How's it working?
azure_credential = ManagedIdentityCredential(client_id=AZURE_CLIENT_ID)
Could you help me to understood how's the above ManagedIdentityCredential is working please?