Azure OpenAI Studio

Bus It 10 Reputation points
2024-02-07T13:37:50.6666667+00:00

I have this issue while adding data to Azure OpenAI studio, how I can solve this problem, I am using a private VNET, the error is: We couldn't connect your data
Principal does not have access to API/Operation. How I can solve the problem? Thanks. Error

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,049 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,197 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,893 questions
{count} vote

2 answers

Sort by: Most helpful
  1. jkmz 10 Reputation points
    2024-06-28T09:19:14.8933333+00:00

    Hey. I had the exact same issue. All roles assigned, using System Assigned Identity, vnet and private endpoints setup correctly. Bunch of 401 errors when OpenAI studio is trying to do PUT:

    PUT <resource_name>.openai.azure.com/openai/ingestion/jobs/<index_name>?api-version=2024-05-01-preview
    
    
    

    Decoding the token used by the operation it looks like it is using your (users) identity. The error message is confusing stating that the "Principal has no access to API/Operation" when in fact that is the user using OpenAi studio that needs the permission.

    Fix: Grant "Cognitive Services OpenAI Contributor" on your OpenAI resource to the user account that is using the OpenAi / Azure AI Studio"

    2 people found this answer helpful.

  2. Q&A Assist
    2024-02-07T13:37:50.67+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Based on the provided context, the error message "Principal does not have access to API/Operation" occurs when the principal (user or service principal) does not have the necessary permissions to access the API or operation. Since you are using a private VNet, it is possible that the necessary permissions are not set up correctly. You can try the following steps to resolve the issue:

    1. Ensure that your private VNet is correctly configured to allow traffic to and from the Azure OpenAI resource.
    2. Ensure that the principal (user or service principal) has the necessary permissions to access the API or operation. You can check the permissions by going to the Azure portal and navigating to the Azure OpenAI resource, then selecting "Access control (IAM)" and checking the role assignments for the principal.
    3. If the necessary permissions are not set up correctly, you can add the necessary role assignments to the principal to allow access to the API or operation.

    References:

    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.