You have a Microsoft Foundry project that contains a model deployment.
You have an application that calls the deployment by using the Azure OpenAl v1 API and DefaultAzureCredential.
The developers at your company receive HTTP 403 errors when they send inference requests, even after running az login.
You need to ensure that the developers can perform model inference. The solution must follow the principle of least privilege.
Which role-based access control (RBAC) role should you assign to the developers?
The correct role is Cognitive Services OpenAl User. The application is using DefaultAzureCredential, so az login only proves the developer's Microsoft Entra identity and enables token acquisition. It does not by itself grant authorization to the model deployment. Azure OpenAI and Microsoft Foundry separate authentication from authorization; Microsoft Entra ID provides token-based authentication, while Azure RBAC controls whether the signed-in principal can perform data-plane actions such as model inference. Microsoft's Foundry guidance states that Microsoft Entra ID supports granular RBAC and that data-plane operations include runtime usage such as chat completions and embedding generation.
For Azure OpenAI resources, the Cognitive Services OpenAI User role specifically allows users to make inference API calls with Microsoft Entra ID against deployed models, while preventing higher-privilege actions such as creating deployments, copying keys, fine-tuning, or managing the resource.
The other roles are not least privilege. Contributor grants broad management-plane permissions. Cognitive Services User is broader and less specific than the Azure OpenAI inference role. Cognitive Services Data Reader is read-oriented and does not provide the required model inference data action. Reference topics: Microsoft Foundry authentication and authorization, Azure RBAC, Microsoft Entra ID keyless authentication, Azure OpenAI v1 API, and least-privilege model inference.
Currently there are no comments in this discussion, be the first to comment!