-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Error (code ManagedIdentityIsNotEnabled) after deploy a web app from AI Studio #1024
Comments
I am getting the same error. The chat playground works great but webapp gives the error. |
|
@sarah-widder This is the bug i was referring to. |
We are investigating. As mitigation, can you try enable managed identity of azure openAI resource, and add role assignment from azure openAI's identity to search resource? See https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/use-your-data-securely |
Same here - exactly the same use case. Was working fine, now not |
@wangyuantao Tried that. Enabled identity for both search and open ai resource. Also redeployed web app. The error changed but still not working. Attaching screenshot |
@wangyuantao have the same error (initial one) and tried your workaround - got the same error as @harshbangad above |
There are some known issues in AOAI Studio for the "deploy web app" feature. Please file support tickets so the support team can troubleshoot and suggest workaround. |
@wangyuantao Can you please add add someone from that team or add the link for the same? Thank you. |
Still occurring, could someone please update on the status of this issue? |
Hi @harshbangad , I just want to confirm a few details with you about your app configuration to see if we can determine a workaround on the webapp side while we are working out issues on the studio deployment side.
|
Thanks for the response @abhahn
|
Try using the API keys instead of managed identities. It is working
…________________________________
From: Harsh Bangad ***@***.***>
Sent: Wednesday, August 7, 2024 10:39 AM
To: microsoft/sample-app-aoai-chatGPT ***@***.***>
Cc: Narasimha Raju ***@***.***>; Comment ***@***.***>
Subject: Re: [microsoft/sample-app-aoai-chatGPT] Error (code ManagedIdentityIsNotEnabled) after deploy a web app from AI Studio (Issue #1024)
Thanks for the response @abhahn<https://github.com/abhahn>
1. The azure search index is hybrid (vector + keyword)
2. Yes, system assigned managed identity
3. Using default. Did not change any of these. I am just adding my index on Azure AI Studio playground where it works and then deploy as webapp.
4. This is where i believe there is the issue. Before Microsoft made changes, the role assigned was contributor for the open ai for the search resource and worked fine. Now the documentation says making it "Cognitive services open ai contributor". I see that role in overall roles but when we select add role assignment for the search resource and then select the open ai resource- the cognitive service openai user does not appear in the option. Even tried making the network public. still does not work.
I tried the same using open ai studio as well and got the following error in adding a new data source itself. The issue is with the new role of "Cognitive services open AI User"
image.png (view on web)<https://github.com/user-attachments/assets/0c138aeb-e8b3-4f56-9cf9-77bdaec86005>
—
Reply to this email directly, view it on GitHub<#1024 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BJ7BMVV44SP2RWPMFVDDKK3ZQGTYDAVCNFSM6AAAAABLP4LZLOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZSGYZDQMBTGY>.
You are receiving this because you commented.Message ID: ***@***.***>
|
@harshbangad , I have also noticed that sometimes I am not able to find the correct roles in the Azure portal when attempting to do the assignment. There is another way to do it through the
For the above you will need to substitute your details into each command for each role you want to apply. For example, if I wanted to assign "Search Index Data Reader" to my AOAI resource, I would substitute Aside from the role assignments being correct, there are just a few other things to check:
What @raju-celerinn has suggested would also work, if you are okay with continuing to use keys. However, for system-assigned MI the most important thing is to be sure that role assignments are correct on resources, you're using the latest code, and the environment does not contain any keys. Let me know if this helps. |
The engineering team is currently working on this and will roll out a fix in about 2 weeks' time. For the time being, there is a workaround for this, if anyone is referencing this issue. I. RBAC access control
II. API keys access control Hope this helps. |
I was able to add the roles through azure portal and got it working. Just a note to add, some of the permissions did not have the option at resource level but subscription/ resource group level. Hopefully Microsoft fixes this soon. Thanks for the help. |
Thanks @iamramengirl. It works!!! |
@iamramengirl , you mentioned that someone was working on a fix. Is this still in progress? |
For the ones who could not apply the workaround, as its bit difficult to understand in first place.
--- Inside Azure Search > Visit Keys > API Access control > Select RBAC or both
1. Search Index Data Reader Role for Azure OpenAI on Azure AI Search
Steps to Assign:
2. Search Service Contributor Role for Azure OpenAI on Azure AI Search
Steps to Assign:
3. Storage Blob Data Contributor Role for Azure OpenAI on Storage Account
Steps to Assign:
4. Cognitive Services OpenAI Contributor Role for Azure AI Search on Azure OpenAI
Steps to Assign:
5. Storage Blob Data Reader Role for Azure AI Search on Storage Account
Steps to Assign:
6. Cognitive Services OpenAI User Role for Web App on Azure OpenAI
Steps to Assign:
Summary:Each step involves navigating to the relevant Azure resource, accessing the "Access control (IAM)" section, and adding the appropriate role for the managed identity of another service that needs to interact with it. This setup ensures that each service can perform its necessary functions, such as reading data, querying schemas, creating resources, and invoking custom skills, while maintaining security through Azure's RBAC system. |
@Number9Solutions Per the last communication with Engineering team, it should be fixed by this time. However, I have not tested yet. @imsantoshg I'm sorry the workaround steps were not easy to understand. I believe this documentation link summarizes the required RBAC for each service. https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/use-your-data-securely#role-assignments. |
I redeployed the app, and it is working for me on an existing web app.
I then tried it on a new webapp and got the same error (exactly the same settings as the working one)
…On Sun, 01 Sep 2024 at 17:06, jppech ***@***.***> wrote:
Capture.d.ecran.2024-09-01.170504.png (view on web)
<https://github.com/user-attachments/assets/e6a51f6a-60c3-4442-9a96-2062b0a3379c>
issue is still not fixed :(
—
Reply to this email directly, view it on GitHub
<#1024 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZWXOO6UKZ24EUYRLG77O3ZUMUORAVCNFSM6AAAAABLP4LZLOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTGM4DIMBTGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This solved it for me. The created web app deployment did not include some of these environment variables so I had to fill them manually. In my case, I kept the api keys authentication. I had to fill Hope this helps for future reference. |
I run into the same error. Is there any update on this issue? |
Thanks @joacosnchz - Going to environment variables fixed it for me. Also, is there a way to modify the indexes/ job to pick only new documents while re-indexing? Every time even if i remove older documents from source and add new ones- the app response suggests answers from both new and old documents in reference[ old should ideally not be there as its removed from the source]- How to modify this from azure ai studio/ index job? |
Describe the bug
Hi,
I hope this is the right place to ask this question.
I'm experiencing a repeatable issue when deploying a web app using the button in AI Studio. Since yesterday, every time I deploy the web app and send any text, I receive the same error message:
I've tested in several tenants. Deployed resources both with Bicep scripts and manually. The issue reproduces every time.
To Reproduce
Steps to reproduce the behavior:
Chat
section in the AI Project (assume that gpt-4 model was deployed in advance).Deploy to a web app
.Create a new web app
orUpdate an existing web app
) and enable chat history.Deploy
.Expected behavior
The web app should reply something like "Hi" without any errors.
Screenshots
Configuration: Please provide the following
The index was created in Azure AI Search using Azure Blob Storage as data source
Output:
Logs
N/A
Output:
The text was updated successfully, but these errors were encountered: