You want to use Azure OpenAI in a web application. You must authenticate the client application with Azure OpenAI securely using managed identities to avoid hardcoding API keys in the app settings. Which configuration should you perform?

Direct Answer (Verified)Reviewed by Sunny (Senior Cloud Engineer)

Correct Answer: Assign the Cognitive Services OpenAI User role to the web app's managed identity in Azure RBAC

Azure OpenAI supports Microsoft Entra ID (formerly Azure AD) authentication. By assigning the 'Cognitive Services User' or 'Cognitive Services OpenAI User' role to the app's manage...

๐Ÿ“‹Part of Microsoft Certified: Azure AI Engineer Associate (AI-102) ยท Azure Certification Practice
Real Exam ScenarioAzure OpenAI Service

You want to use Azure OpenAI in a web application. You must authenticate the client application with Azure OpenAI securely using managed identities to avoid hardcoding API keys in the app settings. Which configuration should you perform?

โœ“ Correct Answer & ExplanationAzure OpenAI Service

Correct Answer

Assign the Cognitive Services OpenAI User role to the web app's managed identity in Azure RBAC

Why This Answer Is Correct

Azure OpenAI supports Microsoft Entra ID (formerly Azure AD) authentication. By assigning the 'Cognitive Services User' or 'Cognitive Services OpenAI User' role to the app's managed identity, the SDK can authenticate securely using TokenCredential without key management.

๐Ÿ“š What This Question Tests

This question evaluates your knowledge of Azure OpenAI Service โ€” a core concept tested in Microsoft Certified: Azure AI Engineer Associate (AI-102). Understanding Azure OpenAI Service is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.