How to fix ManagedIdentityIsNotEnabled error in Azure Web App?

Filip Ge 10 Reputation points
2024-09-26T08:15:46.21+00:00

I recently deployed my AI RAG system build with Azure AI Studio as a web app. When trying to chat on the app I get:

Error code: 400 - {'error': {'requestid': '93caf8bc-7e09-4a2f-8281-4919fd568e77', '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."}}'}}

Do you know how this problem can be solved?
Thanks,
Filip

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
Developer technologies C#
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. TP 124.7K Reputation points Volunteer Moderator
    2024-09-26T08:27:00.2033333+00:00

    Hi Filip,

    In the Azure portal, please navigate to the App Service that was created for your web app. Under Settings -- Identity blade, make sure it is set to On and click Save button.

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP


  2. Shwan Ciyako 0 Reputation points
    2024-11-09T02:43:41.09+00:00

    You just need to enable managed identity on the openai account resource.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.