openai.error.AuthenticationError: Principal does not have access to API/Operation.

Chhanechhara, Milin 100 Reputation points
2023-05-30T14:18:45.72+00:00

Running azure-search-openai-demo project locally with authentication completed successfully.

Received following error:

openai.error.AuthenticationError: Principal does not have access to API/Operation.

127.0.0.1 - - [30/May/2023 08:13:52] "POST /chat HTTP/1.1" 500 -

INFO:werkzeug:127.0.0.1 - - [30/May/2023 08:13:52] "POST /chat HTTP/1.1" 500 -

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,584 questions
0 comments No comments
{count} votes

Accepted answer
  1. VasaviLankipalle-MSFT 15,861 Reputation points
    2023-05-30T20:33:15.3933333+00:00

    Hi @Chhanechhara, Milin , Thanks for using Microsoft Q&A Platform.

    Here is a similar issue try to check if this helps. https://github.com/Azure-Samples/azure-search-openai-demo/issues/87

    Please check the necessary permissions to access the API/Operation. You can also check the access policies for your Azure OpenAI resource and ensure that the principal has the necessary permissions. Refer to this https://github.com/Azure-Samples/azure-search-openai-demo#sharing-environments

    Your Azure Account must have Microsoft.Authorization/roleAssignments/write permissions, such as User Access Administrator or Owner.

    Try regenerating the API key for your Azure OpenAI resource in the Azure portal and see if that helps.

    If you still face issues, I would request you to raise it here: https://github.com/Azure-Samples/azure-search-openai-demo/issues

    I hope this helps.

    Regards,
    Vasavi

    -Please kindly accept the answer and vote 'yes' if you feel helpful to support the community, thanks.


0 additional answers

Sort by: Most helpful