Skip to content

Interview PrepDirectories · Advanced

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.

UseExample
Employee SSOSign in once to Outlook, Teams, Salesforce, ServiceNow
Securing loginsMFA, passkeys, Conditional Access, risky sign-in detection
App identityYour web app logs users in with OIDC through Entra ID
API accessYour back end gets tokens to call Microsoft Graph or your own APIs
Workload identityAn Azure Function reads Key Vault with a managed identity, no secret
ProvisioningSCIM creates and disables accounts in SaaS apps automatically
Partners and customersB2B 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 nameNew name
Azure Active Directory, Azure ADMicrosoft Entra ID
Azure AD Premium P1 / P2Microsoft Entra ID P1 / P2
Azure AD ConnectMicrosoft Entra Connect
Azure AD Domain ServicesMicrosoft Entra Domain Services
Azure AD External IdentitiesMicrosoft 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.

tenant: acme.onmicrosoft.comdirectoryusers · groups · devicesapp registrations · service principalstoken servicesign-in · MFA · Conditional Accessissues OIDC, OAuth and SAML tokensMicrosoft Graph APIon-premises ADEntra ConnectSaaS appsSCIMyour appstokens
One tenant, one token service. The directory holds the objects. The token service signs people in and applies policy on every sign-in. Graph lets admins and apps read and change the directory. Connect brings in on-premises accounts, and SCIM pushes accounts out to apps.

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.

ConceptMeaning
Tenant IDGUID; appears in token tid claims and in URLs
Primary domainacme.onmicrosoft.com, always present
Custom domainacme.example, verified with a DNS record
Single-tenant appSign-in URL uses the tenant ID; only Acme users
Multi-tenant appUses organizations or common; any company's users, each consenting in their own tenant
Workforce vs external tenantEmployees, 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 registrationHolds
OverviewApplication (client) ID, directory (tenant) ID
AuthenticationRedirect URIs, platform type: web, SPA, mobile
Certificates and secretsClient secrets, certificates, federated credentials
API permissionsWhat it asks for: User.Read, your own API scopes
Expose an APIScopes other apps can request from your API
App rolesRoles you can assign to users or apps, sent in the roles claim
Token configurationOptional 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 registrationEnterprise application
IsThe app's definitionThe app's presence in one tenant
Exists inThe home tenant onlyEvery tenant that uses the app
Managed byThe app's developersEach tenant's admins
ConfiguresRedirect URIs, secrets, exposed scopesWho 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.

app registrationContoso Reports, client ID 1f2e…service principalin Contoso's tenantservice principalin Acme's tenantservice principalin Globex's tenant
The blueprint and its copies. Contoso defines the app once. Each organisation that uses it gets its own service principal, where that organisation's admins decide who may use it and what it may access.

Three kinds of service principal:

KindCreated by
ApplicationAn app registration, in each tenant that uses it
Managed identityAzure, for a resource such as a VM or Function (question 155)
LegacyOlder 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)
  1. No secret anywhere. In Azure, DefaultAzureCredential uses the resource's managed identity. On a developer laptop, it falls back to their Azure CLI login.
  2. 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-assignedUser-assigned
Created withThe resourceSeparately
Deleted with the resourceYesNo
Shared by several resourcesNoYes
Good forOne app, one identityMany 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:

IfThen
Any user, any appRequire MFA
Admin rolesRequire phishing-resistant MFA, a passkey or Windows Hello
Finance appRequire a compliant, managed device
Sign-in from a country we do not operate inBlock
High sign-in riskRequire MFA and a password change
Legacy authentication, protocols with no MFABlock

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.

MethodPhishing-resistantNotes
Passkey: FIDO2 key or AuthenticatorYesRecommended for admins and everyone
Windows Hello for BusinessYesBuilt into managed PCs
Certificate-based authenticationYesSmart cards, government
Authenticator push with number matchingNo, but resists blind approvalCommon default
OATH TOTP codesNoHardware tokens or other authenticator apps
SMS, voiceNoFallback only
Temporary Access PassTime-limitedFor 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 groupDynamic group
MembershipManualFrom a rule
Mover handledOnly if someone remembersAutomatically
LicenceFreeP1
RiskStale membersA 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.

B2BB2C / customer identity
UsersPartner employeesThe public
AccountsTheir own organisation'sCreated at sign-up, or a social login
VolumeHundreds to thousandsUp to millions
Typical needAccess to a few internal appsSign-up, branding, social login, self-service reset
Entra featureGuest users, cross-tenant access settingsExternal 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 IdPSCIM call
User assigned to the appPOST /Users
Name or department changedPATCH /Users/{id}
User unassigned or leftPATCH active: false, or DELETE
Group membership changedPATCH /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.

ProtocolConfigured onEndpoint or setting
OIDC sign-inApp registrationlogin.microsoftonline.com/{tenant}/v2.0
OAuth access to your APIApp registration: "Expose an API", scopes, app rolesTokens with aud set to your API's ID
OAuth on-behalf-ofMiddle-tier API swaps a user token for a downstream oneEntra's form of token exchange
SAML SSOEnterprise 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 codeMeaningUsual fix
AADSTS50011Redirect URI does not match the app registrationAdd the exact URI, scheme, port and path included
AADSTS700016Application not found in this tenantWrong client ID or tenant; or the app needs consent in this tenant
AADSTS7000215Invalid client secretSecret expired or copied wrongly; create a new one
AADSTS65001Consent requiredUser or admin must grant the permissions
AADSTS50105User not assigned to the appAssign the user or their group
AADSTS50076MFA requiredExpected; the app must let the user complete MFA
AADSTS53003Blocked by Conditional AccessRead which policy in the sign-in log
AADSTS50126Wrong username or passwordUser error, or a sync problem from on-premises

The order that finds most problems quickly:

  1. Note the code, correlation ID and time from the error page.
  2. Open the sign-in log entry for that correlation ID.
  3. Check the Conditional Access tab of that entry for which policy applied.
  4. Compare the request with the app registration: client ID, tenant, redirect URI, secret expiry, permissions.
  5. 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.

ProductKindTypical buyer
Microsoft Entra IDCloud workforce IdP, plus External ID for customersMicrosoft 365 organisations
Okta Workforce IdentityCloud workforce IdPCompanies wanting a vendor-neutral IdP
Auth0Cloud customer identityProduct teams adding login to their apps
KeycloakOpen-source, self-hostedTeams wanting control and no licence cost
Ping Identity, with ForgeRockEnterprise IdP, cloud or self-hostedBanks, large regulated enterprises
ADFSOn-premises federation serverOlder Windows environments, being retired
Google Workspace, Cloud IdentityCloud IdPGoogle-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)
}
  1. Look up by tenant, issuer and stable subject, never by email alone.
  2. Refresh attributes at each login, the only moment JIT learns about changes.
  3. Each tenant decides whether JIT is allowed.
  4. Create the account with a safe default role, never an admin role from an unverified claim.
JITSCIM
Creates accountsAt first loginWhen assigned
UpdatesAt each loginWhen they change
Deactivates leaversNoYes
SetupNothing extraA 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.

TransformationFrom the directorySent to the app
Renameuser.mailemail
Joingivenname, surnamefullName: Asha Rao
Change formatASHA.RAO@ACME.EXAMPLEasha.rao@acme.example
Choose NameIDImmutable object IDPersistent NameID
Filter groups300 groupsOnly groups starting app-reports-
Map to rolesGroup app-reports-adminsrole: 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.

Combine chapters into one PDF

Pick the chapters you want. They print in the order you pick them.

Interview Prep
Authentication & Identity
Cookies & sessions
Authentication
Tokens
OAuth & OIDC
Enterprise SSO
Directories
Authorization
Other topics
Nothing picked yet