-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Failed to get managed identity token. #699
Comments
Hi @gabrielsusai have you set AZURE_OPENAI_KEY and AZURE_SEARCH_KEY in your local .env file? It looks like it's attempting to use managed identity authentication which is not configured for your resource, so you should set the keys instead. |
@sarah-widder All the below keys have values in my local .env file. I have two copies of the sample-app. The older copy works fine which is currently deployed in production with the same resources. Now, I took the latest version of the sample-app and using the same configuration. Does the new code requires to make any change in the Azure AI resources? AZURE_OPENAI_RESOURCE=bxxxxx |
Could there be an API Version mismatch? I've had this issue before and resolved it by updating the API version in the .env file to the version actually used by the application code. If these values don't match, the API expects the payload in a different format compared to what it actually receives from the application. A mismatch might be caused by pulling the latest upstream changes, where maybe a new API version was implemented in the code, but not updating the API version in the .env file. |
@neissljanik Latest version of the code resolved the issue and I noticed a few changes in the utilization of API version and your own data. |
Started getting this error since last week. Chat playground works fine on Azure AI Studio but the webapp throws this error. @gabrielsusai Please check this bug #1024 |
@harshbangad @GraysonQuartech check if system assigned managed identity is enabled on the Azure OpenAI resource, that would be the cause of this error message. It needs to be enabled. |
@sarah-widder It is enabled. I never changed anything. I have other similar deployments which work fine in both chat and webapp. But since last week, the chat is working fine but webapp is not. You can check the bug i posted above. Others are facing it too. Did something change on webapp side? |
Same issue here. |
In my case, as in 30/Aug/2024 it was disabled. I enabled the managed identity for the AI Service (created via AI Studio Hub) and the Web App worked gracefully! |
I can confirm that I had the same strange understanding that the managed identity for the AI Services need to be enabled, and it solved the issue. |
Describe the bug
While testing the code locally using your own data. I am getting the below error. Works well for just chat.
Error
Error code: 400 - {'error': {'requestid': 'aae728a0-799f-49de-8ade-c1e51a5bbbbc', 'code': 400, 'message': 'Failed to get managed identity token. Response: {"error":{"code":"ManagedIdentityIsNotEnabled","message":"Managed Identity (MI) is not set for this account while the encryption key source is 'Microsoft.KeyVault', customer managed storage or Network Security Perimeter is used."}}'}}
Use AzureSearch Service with semantic search
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error.
Screenshots
Configuration: Please provide the following
Additional context
We have multiple AI apps using data is deployment are running successfully. I checked out the latest code to test and upgrade all the AI apps eventually.
The text was updated successfully, but these errors were encountered: