StudyToCert

All certifications / Azure AI Engineer / Lessons

Microsoft Certified: Azure AI Engineer Associate AI-102 · Domain 1: Plan and manage an Azure AI solution

Authentication: API keys vs Microsoft Entra ID, managed identities and Cognitive Services RBAC roles

▶ Watch the overview video

Last reviewed October 6, 2026 · Leer en español

Explain it simpler

There are two ways to prove to an Azure AI service that you are allowed to use it. The first is a key, which works like a shared house key: anyone holding a copy can get in, and you cannot tell who used it. The second is signing in with Microsoft Entra ID, Microsoft's identity system. Each app or person gets its own identity, and you give that identity a specific permission, called a role, such as 'allowed to call this service'. For apps running in Azure, a managed identity is best: Azure creates and looks after the app's sign-in details for it, so there is no password to store or leak. It is like replacing one shared house key with personal badges that each open only the doors they need, and that leave a record every time.

During a routine review at Marlow County Library Services, Jess finds the Azure OpenAI key for the reading-recommendation app pasted in three places: the app's settings file, a team wiki page and a chat thread from last spring. The logs show thousands of calls last month, and nobody can say which app, script or person made them, because every call used the same key. The library's IT director asks a simple question: 'Can we make it so only the recommendation app can call the model, and we can see exactly who did what?' Jess knows the answer involves identities and roles instead of shared secrets. What exactly should she set up?

Azure AI services accept two kinds of credentials. Keys are simple: every resource has two, and anyone who holds one can call the resource. That simplicity is also the risk, because a key copied into code, a config file or a chat message works for whoever finds it, and the logs cannot tell you which person or app used it. Microsoft Entra ID (formerly Azure Active Directory) authentication replaces the shared secret with a token issued to a specific identity, and access is controlled with Azure role-based access control (RBAC). Tokens are short-lived, tied to one identity and can be revoked by removing a role, which keys cannot offer.

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 7 more sections, 6 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study Azure AI Engineer for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the Azure AI Engineer study plan