Principal does not have access to API/Operation
Resolve the Azure OpenAI 'principal does not have access to API' error by assigning the correct RBAC role to your user or application identity.
Principal does not have access to API/Operation
Why?
This issue can occur when you or application does not have correct permissions to use the AI resource.
How to fix?
- Identify which role you want to assign, in our case we will consider Azure Open AI resource and it supports these roles.
- For application, we would recommend Cognitive Services OpenAI User
- Follow this to assign a role
In the Azure portal the fix looks like this: open the Azure OpenAI resource, go to Access control (IAM) > Add role assignment, pick the Cognitive Services OpenAI User role and add your user or app identity as a member:
Related posts
This post is licensed under CC BY 4.0 by the author.

