Appearance
Microsoft Entra ID and Identity Providers
148. What is Microsoft Entra ID, and what is it used for?
The short answer
Microsoft Entra ID, formerly Azure Active Directory, is Microsoft's cloud identity service. It holds an organisation's users, groups, devices and app registrations, and it signs people in to Microsoft 365, Azure and thousands of other SaaS apps with SSO, MFA, passkeys and Conditional Access. It issues tokens over OpenID Connect, OAuth 2.0 and SAML, provisions accounts into apps with SCIM, gives Azure workloads identities through managed identities, and exposes everything through the Microsoft Graph API. Every Microsoft 365 and Azure customer already has an Entra ID tenant.
| Use | Example |
|---|---|
| Employee SSO | Sign in once to Outlook, Teams, Salesforce, ServiceNow |
| Securing logins | MFA, passkeys, Conditional Access, risky sign-in detection |
| App identity | Your web app logs users in with OIDC through Entra ID |
| API access | Your back end gets tokens to call Microsoft Graph or your own APIs |
| Workload identity | An Azure Function reads Key Vault with a managed identity, no secret |
| Provisioning | SCIM creates and disables accounts in SaaS apps automatically |
| Partners and customers | B2B guest access; customer login with External ID |
149. Why was Azure Active Directory renamed Microsoft Entra ID?
The short answer
Microsoft announced the rename in July 2023. There were two reasons. The name "Azure Active Directory" made people think it was Active Directory running in Azure, when it is a different product with different protocols. And Microsoft had grouped its identity and network access products into one family called Microsoft Entra, so the core directory took the family name. Nothing changed technically: the same tenants, endpoints, APIs, licences and features continued, and the login.microsoftonline.com sign-in URLs stayed the same.
| Old name | New name |
|---|---|
| Azure Active Directory, Azure AD | Microsoft Entra ID |
| Azure AD Premium P1 / P2 | Microsoft Entra ID P1 / P2 |
| Azure AD Connect | Microsoft Entra Connect |
| Azure AD Domain Services | Microsoft Entra Domain Services |
| Azure AD External Identities | Microsoft Entra External ID |
Why it matters in an interview. Using the current names shows you are up to date, and knowing they are the same product lets you read older documentation and error messages, which still say "AAD" and use AADSTS error codes.
150. Explain Microsoft Entra ID architecture?
The short answer
Entra ID is a global, multi-tenant service run by Microsoft. Each organisation has its own tenant, an isolated directory holding its users, groups, devices, app registrations and service principals. A security token service at login.microsoftonline.com handles sign-in for every tenant, evaluates MFA and Conditional Access policies, and issues OIDC, OAuth and SAML tokens. Microsoft Graph is the API over all of it. Entra Connect or Cloud Sync links on-premises AD. The service is replicated across many data centres for availability.
151. What is a tenant in Entra ID?
The short answer
A tenant is one organisation's dedicated, isolated instance of Entra ID. It has a unique tenant ID, a GUID, and at least one domain such as acme.onmicrosoft.com, plus custom domains like acme.example once verified. It contains that organisation's users, groups, apps and policies, and other tenants cannot see into it. A company usually has one tenant. Its Azure subscriptions and Microsoft 365 services trust it. Apps can be single-tenant, accepting only their own organisation's users, or multi-tenant, accepting users from any tenant.
| Concept | Meaning |
|---|---|
| Tenant ID | GUID; appears in token tid claims and in URLs |
| Primary domain | acme.onmicrosoft.com, always present |
| Custom domain | acme.example, verified with a DNS record |
| Single-tenant app | Sign-in URL uses the tenant ID; only Acme users |
| Multi-tenant app | Uses organizations or common; any company's users, each consenting in their own tenant |
| Workforce vs external tenant | Employees, or customers through External ID |
A multi-tenant pitfall. A multi-tenant app receives tokens from any tenant. It must check the tid claim against the tenants it has onboarded, or anyone with any Entra account, including one they created for free, can log in.
152. What is an app registration?
The short answer
An app registration is the global definition of your application in Entra ID, created in the tenant where you build the app. It gives the app an application (client) ID and holds its configuration: redirect URIs, whether it is single or multi-tenant, client secrets or certificates, the API permissions it asks for, the scopes and app roles it exposes if it is an API, and token settings. It is like the blueprint of the app. Registering is the first step to letting users sign in to your app with Entra ID or letting it call Microsoft Graph.
| Section of the registration | Holds |
|---|---|
| Overview | Application (client) ID, directory (tenant) ID |
| Authentication | Redirect URIs, platform type: web, SPA, mobile |
| Certificates and secrets | Client secrets, certificates, federated credentials |
| API permissions | What it asks for: User.Read, your own API scopes |
| Expose an API | Scopes other apps can request from your API |
| App roles | Roles you can assign to users or apps, sent in the roles claim |
| Token configuration | Optional claims, groups claim |
Prefer certificates or federated credentials over secrets. A client secret is a password that expires after up to two years and gets copied into config files. A certificate, or a federated identity credential, which lets a GitHub Actions workflow or a Kubernetes pod sign in using its own platform token, means no long-lived secret exists.
153. What is an enterprise application in Entra ID?
The short answer
An enterprise application is how an app appears and is managed inside a particular tenant. Under the hood it is that app's service principal in the tenant. This is where admins configure SSO for a SaaS app from the gallery, such as Salesforce with SAML, assign which users and groups may use it, set up SCIM provisioning, grant or review consent to its permissions, and see its sign-in logs. If you register your own app, an enterprise application is created for it in your tenant automatically. When another tenant's users consent to a multi-tenant app, one is created in their tenant too.
| App registration | Enterprise application | |
|---|---|---|
| Is | The app's definition | The app's presence in one tenant |
| Exists in | The home tenant only | Every tenant that uses the app |
| Managed by | The app's developers | Each tenant's admins |
| Configures | Redirect URIs, secrets, exposed scopes | Who may use it, SSO settings, provisioning, consent |
154. What is a service principal, and how does it differ from an app registration?
The short answer
The app registration, or application object, is the single global template of an app, living in its home tenant. A service principal is the local instance of that app in a specific tenant: the identity that actually signs in, receives permissions, is assigned users, and appears in logs. One app registration can have many service principals, one per tenant that uses it. When you grant an app permission to read a Key Vault or call Graph, you grant it to the service principal. It is the same relationship as a class and its objects.
Three kinds of service principal:
| Kind | Created by |
|---|---|
| Application | An app registration, in each tenant that uses it |
| Managed identity | Azure, for a resource such as a VM or Function (question 155) |
| Legacy | Older apps created before app registrations existed |
155. What is a managed identity, and when should it be used?
The short answer
A managed identity is a service principal that Azure creates and manages for an Azure resource, such as a VM, App Service, Function or container app, so the code running there can get Entra ID tokens without any secret in its configuration. Azure rotates its credentials for you. The code asks a local endpoint for a token for, say, Key Vault or a SQL database, and gets one. A system-assigned identity lives and dies with its resource. A user-assigned identity is a separate resource you can attach to several. Use one whenever Azure code calls an Entra-protected service.
ts
import { DefaultAzureCredential } from '@azure/identity'
import { SecretClient } from '@azure/keyvault-secrets'
const credential = new DefaultAzureCredential() // (1)
const vault = new SecretClient('https://acme-orders-kv.vault.azure.net', credential)
const dbPassword = await vault.getSecret('orders-db-password') // (2)- No secret anywhere. In Azure,
DefaultAzureCredentialuses the resource's managed identity. On a developer laptop, it falls back to their Azure CLI login. - The Key Vault call succeeds only if this identity was granted access to the vault. That is a role assignment, least privilege written as configuration.
| System-assigned | User-assigned | |
|---|---|---|
| Created with | The resource | Separately |
| Deleted with the resource | Yes | No |
| Shared by several resources | No | Yes |
| Good for | One app, one identity | Many instances sharing permissions; identity ready before deploy |
This solves "secret zero" (the vault question). Outside Azure, the same idea is called workload identity federation: a GitHub Actions job or a Kubernetes pod in another cloud proves itself with its own platform token and gets an Entra token, again with no stored secret.
156. What is Conditional Access?
The short answer
Conditional Access is Entra ID's policy engine, evaluated at every sign-in. Each policy says: if these conditions hold, such as this user or group, this app, this location, this device platform, this sign-in risk, then require these controls, such as MFA, a phishing-resistant method, a compliant or managed device, accepting terms of use, or block access. It is "if this, then that" for logins, and it is how organisations build Zero Trust in Microsoft environments. It needs an Entra ID P1 licence; risk-based conditions need P2.
Example policies, as a security team would write them:
| If | Then |
|---|---|
| Any user, any app | Require MFA |
| Admin roles | Require phishing-resistant MFA, a passkey or Windows Hello |
| Finance app | Require a compliant, managed device |
| Sign-in from a country we do not operate in | Block |
| High sign-in risk | Require MFA and a password change |
| Legacy authentication, protocols with no MFA | Block |
Roll-out practice. Start every new policy in report-only mode and read its effect in the sign-in logs. Always exclude two break-glass emergency accounts, protected with strong passkeys and closely monitored, so a bad policy cannot lock every admin out.
157. How does Entra ID support MFA?
The short answer
Entra ID offers many methods: Microsoft Authenticator push notifications with number matching, or passwordless phone sign-in; passkeys, on FIDO2 security keys or in Authenticator; Windows Hello for Business; certificate-based authentication with smart cards; OATH hardware or software codes; and, as weaker fallbacks, SMS and voice calls. Admins choose which methods are allowed, and Conditional Access authentication strengths can demand phishing-resistant ones for sensitive apps. A Temporary Access Pass lets a new or locked-out user register methods safely.
| Method | Phishing-resistant | Notes |
|---|---|---|
| Passkey: FIDO2 key or Authenticator | Yes | Recommended for admins and everyone |
| Windows Hello for Business | Yes | Built into managed PCs |
| Certificate-based authentication | Yes | Smart cards, government |
| Authenticator push with number matching | No, but resists blind approval | Common default |
| OATH TOTP codes | No | Hardware tokens or other authenticator apps |
| SMS, voice | No | Fallback only |
| Temporary Access Pass | Time-limited | For onboarding and recovery |
Ways to turn MFA on: security defaults, a free setting that requires MFA for everyone with basic rules; Conditional Access policies, which need P1 and allow fine control; and Microsoft's own mandatory MFA for signing in to Azure's admin portals.
158. What are security groups and dynamic groups?
The short answer
A security group is a set of users, devices or service principals used to grant access in one go: assign the group to an app, a role or a resource, and every member gets it. Membership can be assigned, added by hand or by a script, or dynamic, where Entra ID adds and removes members automatically from a rule on their attributes, such as user.department -eq "Finance". Dynamic groups make joiner, mover and leaver changes automatic. They need a P1 licence. Microsoft 365 groups are a different kind that also gives a shared mailbox and Teams site.
text
(user.department -eq "Finance") -and (user.country -eq "GB") -and (user.accountEnabled -eq true)Reading the rule: members are enabled users whose department is Finance and whose country is GB. When HR changes Asha's department to Finance, the sync updates her attribute, and she joins the group, and so gains access to the finance app, with nobody filing a ticket. When she moves out, she leaves it.
| Assigned group | Dynamic group | |
|---|---|---|
| Membership | Manual | From a rule |
| Mover handled | Only if someone remembers | Automatically |
| Licence | Free | P1 |
| Risk | Stale members | A wrong rule, or wrong HR data, grants wide access |
Group claims in tokens. Entra ID can put group IDs in the groups claim of tokens. A user in hundreds of groups exceeds the limit, about 200 in a JWT, and the token then carries an "overage" pointer to fetch groups from Graph instead. Prefer app roles for authorisation in your own apps.
159. What are B2B and B2C identity scenarios?
The short answer
B2B, business to business, means letting people from partner organisations into your apps using their own company accounts. In Entra ID, you invite them as guest users; they sign in with their home Entra ID, Google or a one-time email code, and your tenant controls what they can reach. B2C, business to consumer, means letting customers sign up and log in to your public apps, with self-service sign-up, social logins, branding and millions of users. Microsoft's current product for customer identity is Entra External ID. The older Azure AD B2C stopped being sold to new customers in May 2025.
| B2B | B2C / customer identity | |
|---|---|---|
| Users | Partner employees | The public |
| Accounts | Their own organisation's | Created at sign-up, or a social login |
| Volume | Hundreds to thousands | Up to millions |
| Typical need | Access to a few internal apps | Sign-up, branding, social login, self-service reset |
| Entra feature | Guest users, cross-tenant access settings | External ID in an external tenant |
160. What is SCIM provisioning?
The short answer
SCIM, the System for Cross-domain Identity Management, RFC 7643 and RFC 7644, is a standard REST API for creating, updating and deactivating user accounts and groups in an application automatically. The identity provider is the client: when a user is assigned to an app, changes department or leaves, the IdP calls the app's SCIM endpoint, POST /Users, PATCH /Users/{id} and so on. The app always has up-to-date accounts, and a leaver is deactivated in every app within minutes, without waiting for them to try logging in.
http
PATCH /scim/v2/Users/2819c223 HTTP/1.1
Host: app.example
Authorization: Bearer <token issued to the IdP>
Content-Type: application/scim+json
{ "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [{ "op": "replace", "path": "active", "value": false }] }Reading it: the IdP tells the app that user 2819c223 is no longer active, because they left the company. The app should immediately disable the account and end their sessions.
| Event at the IdP | SCIM call |
|---|---|
| User assigned to the app | POST /Users |
| Name or department changed | PATCH /Users/{id} |
| User unassigned or left | PATCH active: false, or DELETE |
| Group membership changed | PATCH /Groups/{id} |
SCIM versus JIT. JIT creates accounts at first login, but cannot remove them (question 164). SCIM handles the whole lifecycle, which is why enterprise customers ask for it.
161. How does Entra ID integrate with SAML, OAuth 2.0, and OIDC?
The short answer
Entra ID is an identity provider for all three. For OIDC, apps use the v2.0 endpoints under https://login.microsoftonline.com/{tenant}/v2.0, with discovery at /.well-known/openid-configuration, and get ID tokens. For OAuth 2.0, apps request access tokens for Microsoft Graph or for your own APIs, using scopes like api://orders/Orders.Read, with the code flow, client credentials or on-behalf-of. For SAML, admins configure an enterprise application with the SP's entity ID and ACS URL, map attributes to claims, and download Entra's federation metadata.
| Protocol | Configured on | Endpoint or setting |
|---|---|---|
| OIDC sign-in | App registration | login.microsoftonline.com/{tenant}/v2.0 |
| OAuth access to your API | App registration: "Expose an API", scopes, app roles | Tokens with aud set to your API's ID |
| OAuth on-behalf-of | Middle-tier API swaps a user token for a downstream one | Entra's form of token exchange |
| SAML SSO | Enterprise application, "Single sign-on" | Entity ID, ACS URL, claims, signing certificate |
The {tenant} part of the URL can be your tenant ID for single-tenant apps, organizations for any work account, or common to also allow personal Microsoft accounts.
162. How would you troubleshoot a Microsoft Entra ID login failure?
The short answer
Start with the error code: Entra errors show an AADSTS number, a correlation ID and a timestamp. Look the code up, then find the matching entry in the tenant's sign-in logs using the correlation ID, which shows the user, app, Conditional Access policies applied and the exact failure reason. Then check the usual causes: redirect URI mismatch, wrong tenant or client ID, an expired client secret, consent not granted, the user not assigned to the app, MFA or a Conditional Access block, and for SAML an entity ID, ACS URL or certificate mismatch.
| Error code | Meaning | Usual fix |
|---|---|---|
AADSTS50011 | Redirect URI does not match the app registration | Add the exact URI, scheme, port and path included |
AADSTS700016 | Application not found in this tenant | Wrong client ID or tenant; or the app needs consent in this tenant |
AADSTS7000215 | Invalid client secret | Secret expired or copied wrongly; create a new one |
AADSTS65001 | Consent required | User or admin must grant the permissions |
AADSTS50105 | User not assigned to the app | Assign the user or their group |
AADSTS50076 | MFA required | Expected; the app must let the user complete MFA |
AADSTS53003 | Blocked by Conditional Access | Read which policy in the sign-in log |
AADSTS50126 | Wrong username or password | User error, or a sync problem from on-premises |
The order that finds most problems quickly:
- Note the code, correlation ID and time from the error page.
- Open the sign-in log entry for that correlation ID.
- Check the Conditional Access tab of that entry for which policy applied.
- Compare the request with the app registration: client ID, tenant, redirect URI, secret expiry, permissions.
- For SAML, use a SAML tracer and compare entity ID, ACS URL and certificate (the SAML troubleshooting question).
163. What are Okta, Auth0, Keycloak, Ping Identity, ForgeRock, and ADFS used for?
The short answer
They are all identity providers, aimed at different needs. Okta is a cloud IdP for workforce SSO, MFA and provisioning, a main rival to Entra ID. Auth0, owned by Okta since 2021, is developer-focused customer identity: login for your app's users. Keycloak is a free, open-source IdP you host yourself, now a CNCF project. Ping Identity, which merged with ForgeRock in 2023, serves large enterprises and banks, both workforce and customer, cloud and on-premises. ADFS is Microsoft's older on-premises federation server for SAML and WS-Federation, which Microsoft now recommends replacing with Entra ID.
| Product | Kind | Typical buyer |
|---|---|---|
| Microsoft Entra ID | Cloud workforce IdP, plus External ID for customers | Microsoft 365 organisations |
| Okta Workforce Identity | Cloud workforce IdP | Companies wanting a vendor-neutral IdP |
| Auth0 | Cloud customer identity | Product teams adding login to their apps |
| Keycloak | Open-source, self-hosted | Teams wanting control and no licence cost |
| Ping Identity, with ForgeRock | Enterprise IdP, cloud or self-hosted | Banks, large regulated enterprises |
| ADFS | On-premises federation server | Older Windows environments, being retired |
| Google Workspace, Cloud Identity | Cloud IdP | Google-based organisations |
What they share. All of them speak OIDC, OAuth 2.0 and SAML, so an app built on those standards can switch IdPs, or support customers on any of them (supporting SAML and OIDC).
164. What is just-in-time (JIT) user provisioning?
The short answer
JIT provisioning creates a user's account in an application at their first SSO login, using the attributes in the SAML assertion or ID token, instead of creating accounts in advance. When Asha first signs in to the app, there is no account yet, so the app creates one from her ID, email, name and groups, then logs her in. It is easy to set up and needs no extra integration. Its limits: it cannot remove or disable accounts when people leave, the app only learns about changes when the user next logs in, and accounts do not exist before first login.
ts
async function findOrProvision(identity: ExternalIdentity) {
const existing = await identities.find(identity.tenantId, identity.issuer, identity.subject) // (1)
if (existing) {
await users.updateProfile(existing.userId, { name: identity.name, groups: identity.groups }) // (2)
return existing.userId
}
const tenant = await tenants.get(identity.tenantId)
if (!tenant.jitEnabled) throw new HttpError(403, 'No account. Ask your admin for access.') // (3)
return users.createWithIdentity(identity, { role: tenant.defaultRole }) // (4)
}- Look up by tenant, issuer and stable subject, never by email alone.
- Refresh attributes at each login, the only moment JIT learns about changes.
- Each tenant decides whether JIT is allowed.
- Create the account with a safe default role, never an admin role from an unverified claim.
| JIT | SCIM | |
|---|---|---|
| Creates accounts | At first login | When assigned |
| Updates | At each login | When they change |
| Deactivates leavers | No | Yes |
| Setup | Nothing extra | A SCIM endpoint in the app |
165. What is claims transformation in enterprise identity?
The short answer
Claims transformation means changing the claims or attributes an IdP sends, so they match what a particular app expects. Examples are renaming an attribute, such as sending mail as email; changing format, such as joining first and last name, or lower-casing a username; picking a different source, such as using the employee ID as the NameID; filtering groups to only those relevant to the app; or mapping group IDs to the role names the app uses. In Entra ID this is done per enterprise application in its claims configuration; in ADFS it is done with claim rules.
| Transformation | From the directory | Sent to the app |
|---|---|---|
| Rename | user.mail | email |
| Join | givenname, surname | fullName: Asha Rao |
| Change format | ASHA.RAO@ACME.EXAMPLE | asha.rao@acme.example |
Choose NameID | Immutable object ID | Persistent NameID |
| Filter groups | 300 groups | Only groups starting app-reports- |
| Map to roles | Group app-reports-admins | role: admin |
Why it matters. Most "SSO works but the user has no permissions" problems are claims problems: the app expected role and received http://schemas.microsoft.com/ws/2008/06/identity/claims/role, or the group was not included. Compare the assertion the app actually received with what its code reads.