Permissions and Consent
Microsoft Entra ID: Integrations & Access Troubleshooting
Course 1 · Chapter 6 · Permissions and Consent
Chapters 4 and 5 were about credentials: the integration proving who it is. This chapter is about what happens after it proves who it is. An integration with a perfectly valid secret and certificate can still fail, because Entra asks three further questions before it issues a token: what is this application allowed to do? (permissions and consent), who is allowed to use it? (assignment), and under what conditions? (Conditional Access, MFA and guest rules). These are the quiet causes. Nothing has expired, and nothing in your system has changed. Someone in the client's tenant changed a rule.
| Gate | The question | Who controls it | Typical symptom |
|---|---|---|---|
| 1. Permissions and consent | May this application have this access? | The client's administrator (or, for low-impact permissions, the user) | A consent prompt, "Approval required", or an error saying consent is missing |
| 2. Assignment | May this user use this application? | The client's administrator or the enterprise application's owner | "Works for some people, not others"; an error that the user isn't assigned to a role for the app |
| 3. Conditions | Is this sign-in, from this place and device, acceptable? | The client's security team (Conditional Access, cross-tenant access settings) | "Blocked by Conditional Access"; MFA demands; guests only, or one location only |
Part 1: Permissions — What the Application May Do
Back in Chapter 2 you met the two ways an application accesses data. Microsoft's permissions overview calls them delegated access (the application acts on behalf of a signed-in user) and app-only access (the application acts as itself, with no user present). Each uses a different kind of permission, and the difference decides who must approve it.
| Delegated permissions | Application permissions | |
|---|---|---|
| Also called | Scopes, OAuth2 permission scopes | App roles, app-only permissions |
| Access context | On behalf of a signed-in user | No user; the app's own identity (Chapter 3's client-credentials flow) |
| What the app can reach | Only what both the permission and the signed-in user can reach. Microsoft's example: an app with Files.Read.All delegated can read only the files that user can personally access | Everything the permission covers. An app with the Graph application permission Files.Read.All can read any file in the tenant |
| Who can consent | Users for their own data (where the tenant allows it); admins for all users | Only an administrator |
| How it is requested | Statically (a list on the app registration) or dynamically (individual permissions requested at sign-in) | Static only (the list on the app registration) |
| Recorded as (Microsoft Graph) | An oAuth2PermissionGrant | An appRoleAssignment |
For your integration, the practical reading is this. If it signs users in and then calls an API for them (an OIDC integration), it uses delegated permissions, even if
that is just the basic openid and profile sign-in scopes. If it runs in the background and calls an API for itself (the client-credentials pattern from Chapter 3,
whose token request asks for resource/.default), it uses application permissions, which only an administrator can approve. SAML single sign-on and SCIM provisioning
don't use this permission model for their core job; their access is governed by the enterprise application's configuration and the provisioning credential instead.
Part 2: Consent — Who Said Yes
A permission listed on a registration is only a request. Consent is the recorded approval. Without a record of consent covering what the application asks for, Entra won't issue the token.
User consent
When a user signs in, Entra checks whether consent for the required permissions already exists. If there is no record of user or admin consent, the user is shown a consent prompt listing the permissions and the publisher. If they accept, the consent is recorded and they usually don't need to consent again. But user consent is possible only where the tenant allows it for that application and those permissions. If it's disabled, or the user isn't allowed to consent to what's requested, the user is not prompted at all, which can look to the user like a plain failure with no explanation.
The tenant's user-consent setting is one of three built-in options, according to Microsoft:
- Disable user consent: users can't grant permissions to applications. They keep signing in to applications they already consented to, or that an administrator consented to for them, but can't approve anything new.
- Users can consent to applications from verified publishers or your organisation, but only for permissions you select: only permissions classified as low impact, and only for verified-publisher or in-tenant applications.
- Users can consent to all applications: any permission that doesn't itself require admin consent.
A client may well have changed this setting as part of a security tidy-up. If it moved from the third option to the first, a newly onboarded user of your product, who needs consent for the first time, suddenly can't complete sign-in, while existing users carry on.
Admin consent
Some permissions can only be consented to by an administrator: application permissions, and many high-privilege delegated ones. Authentication requests prompt for admin consent if consent wasn't granted and one of those permissions is requested. Custom application scopes aren't treated as high-privilege. Administrators can also consent on behalf of the whole organisation, after which users aren't prompted. Microsoft's page on granting consent lists who can do it:
| Role | May grant tenant-wide consent for |
|---|---|
| Privileged Role Administrator | Apps requesting any permission, for any API |
| Cloud Application Administrator, Application Administrator (and AI Administrator, per the current page) | Any permission for any API except Microsoft Graph app roles (application permissions) |
| A custom directory role with the permission to grant permissions to applications | The permissions that role covers |
That table matches Chapter 5's note that Graph application permissions need a higher-privileged person than most client administrators expect. Plan for a request to travel upward.
Where to see consent in the portal
| Where | You learn |
|---|---|
| Entra ID > Enterprise apps > All applications > <app> > Permissions (under Security) | The permissions granted in this tenant; the page where an authorised admin selects Grant admin consent. Chapter 5's note applies: the enterprise application exists in this tenant only if someone consented or it was added |
| Entra ID > App registrations > <app> > API permissions (under Manage) | The permissions the application requests, and whether consent has been granted. Only in the tenant that owns the registration (Chapter 5) |
The admin consent URL
When the client's administrator hasn't granted consent, the easiest route is often a link they can open. Microsoft documents the tenant-wide admin consent URL format, which needs only the application's client ID:
The administrator should still review the listed permissions before accepting. Never ask for consent to be granted blindly, and never send a link that you cannot explain. Your product may have its own "connect" page that builds this URL for the customer; check how yours does it before improvising one.
The admin consent workflow
If users aren't allowed to consent, the tenant may have an admin consent workflow. A user signing in sees an Approval required window, types a justification and selects Request approval; a Request sent message follows. Designated reviewers are notified, and the user is emailed when the request is approved, denied or blocked. Microsoft notes that if a user sends several requests, only the first is submitted. So "I clicked request approval three days ago and nothing happened" is a real, common support case: the answer is to find out who the reviewers are and whether anyone is watching their queue.
- New permissions requested. Microsoft says a user may be prompted again even after an administrator consents, for example if the application requests a permission the administrator hasn't granted. A product update that adds a scope can break sign-in for a tenant that consented to the old list.
- Consent revoked or removed. The permissions overview lists "previously granted consent is revoked" as a cause of a new consent prompt.
- Granting consent again can replace earlier grants. Microsoft warns that granting tenant-wide admin consent may revoke permissions already granted tenant-wide for that application (permissions users granted for themselves aren't affected). Re-consenting is not always harmless.
- The policy changed. The tenant's user-consent setting was tightened (above).
Part 3: Assignment — Who May Use the Application
Chapter 5 introduced the Assignment required? property. This is its mechanism. Even after tenant-wide admin consent, who can sign in is a separate decision. Microsoft is explicit that granting tenant-wide admin consent allows all users to access the application unless otherwise restricted, and that the way to restrict it is to require user assignment and then assign users or groups.
- With Assignment required = Yes, only assigned users, groups and applications can obtain a token. Unassigned users are refused.
- Assign under Entra ID > Enterprise apps > <app> > Users and groups > Add user/group. If the application defines no roles, the role is Default Access (its ID is all zeros).
- Roles that can assign: Cloud Application Administrator, Application Administrator, User Administrator, or the owner of the service principal.
- Group assignment needs Microsoft Entra ID P1 or P2. Assigning a group gives access to the users in that group; it does not cascade to nested groups, and nested group membership is not currently supported.
- Microsoft adds that applications that require user assignment must have their permissions consented to by an administrator, even if the tenant's user-consent policy would otherwise allow users to consent.
Part 4: Conditional Access and MFA — The Conditions
Conditional Access is Entra's policy engine. Microsoft describes policies at their simplest as if-then statements: if a user wants to access a resource, then they must complete an action. It gathers signals (user, group, IP location, device, application, sign-in risk) and makes a decision: block access, or grant access with requirements such as multifactor authentication, a compliant or hybrid-joined device, an approved client app, a password change or acceptance of terms of use. Two facts from Microsoft's overview matter for troubleshooting:
- Policies are enforced after first-factor authentication is completed. So a user can type the right password and then be stopped by a policy.
- It needs Microsoft Entra ID P1 licences (Microsoft 365 Business Premium also includes it). Risk-based policies need Entra ID P2. When licences expire, Microsoft says policies aren't automatically disabled or deleted, but can't be updated.
Conditional Access lives at Entra ID > Conditional Access, readable by someone with at least the Security Reader role. The Policies page lists them, including report-only policies (which log what would have happened without enforcing), and has a What If tool.
Two ways this hits an integration
| User sign-in (OIDC / SAML) | Service principal sign-in (client credentials) | |
|---|---|---|
| Policy targets | Users, groups, apps, locations, devices, risk | Workload identities: individual service principals that the policy lists directly |
| Possible outcomes | Block, or grant with controls (MFA, compliant device and so on) | Block only; no MFA is possible for a workload identity |
| Typical trigger | A new policy requires MFA or a compliant device for "all cloud apps"; the user is on a new network | A policy blocks token requests from outside known public IP ranges, or on service-principal risk |
| Licence note | Entra ID P1 | Workload Identities Premium is required to create or change such policies; existing ones keep working but can't be modified |
| Coverage | Applies to the user's sign-in to the app | Single-tenant service principals registered in the client's tenant. Multitenant and third-party SaaS applications aren't covered, and managed identities aren't either |
| Where it shows | Sign-in logs > the Conditional Access tab of an event | Sign-in logs > Service principal sign-ins; failure reason "Access has been blocked due to Conditional Access policies." |
MFA and sign-in prompts
A new policy that demands MFA is a common surprise. For interactive sign-in, the user is simply prompted. But if your integration uses a flow that can't show a prompt (a non-interactive background
refresh, an embedded browser, a legacy protocol), the request fails with a message saying interaction or MFA is required (Chapter 3's interaction_required family; the matching AADSTS numbers are below).
Microsoft lists "blocking sign-ins for users who try to use legacy authentication protocols" as a commonly applied policy, which can break older connectors silently.
Part 5: Guests and Cross-Tenant Settings
If the people who cannot sign in are guests (B2B users from another organisation, or your own support staff signing in to the client's tenant), look at the cross-tenant rules. Microsoft's overview describes cross-tenant access settings that control inbound access (users from external organisations reaching the client's resources) and outbound access (the client's users reaching others). Key facts:
- By default, B2B collaboration with other Entra organisations is enabled, and the default settings apply to all external organisations unless organisation-specific settings exist, which take precedence.
- Access settings can be scoped to specific users, groups and applications, and blocking inbound access for all external users means all applications are blocked too. Microsoft warns that changing defaults to block can break existing business-critical access.
- Trust settings decide whether the client's Conditional Access policies accept the MFA and device claims from a guest's home tenant. If MFA isn't trusted, a guest who already did MFA at home is asked again. If a policy requires a compliant device and the claim isn't trusted, the guest is blocked.
- Configuring these settings needs at least Security Administrator, and targeting specific users or apps requires a Microsoft Entra ID P1 licence on the tenant being configured.
- Changes are recorded in the audit logs under the category
CrossTenantAccessSettings(Chapter 7).
Also remember the plainer cause: the guest account may simply not exist yet in the client's tenant, which produces its own errors (below).
Reading the Errors
Chapter 7 covers the sign-in logs and error codes in depth. For now, here are the codes most related to this chapter, with the meaning given in Microsoft's current error-code reference (the error name is the part before the dash). Treat the code as a pointer, then confirm in the sign-in log.
| Code | Name and Microsoft's meaning (shortened) | Points to |
|---|---|---|
| AADSTS65001 | DelegationDoesNotExist: the user or administrator hasn't consented to use the application | Gate 1: consent missing or revoked |
| AADSTS90094 | AdminConsentRequired: administrator consent is required | Gate 1: an admin must consent |
| AADSTS65004 | UserDeclinedConsent: the user declined to consent to access the app | Gate 1: the user said no; retry and accept |
| AADSTS50105 | EntitlementGrantsNotFound: the signed-in user isn't assigned to a role for the signed-in app; assign the user | Gate 2: assignment required, user not assigned |
| AADSTS53003 | BlockedByConditionalAccess: access has been blocked by Conditional Access policies; the policy doesn't allow token issuance | Gate 3: find the policy that applied |
| AADSTS50076 | UserStrongAuthClientAuthNRequired: because of a configuration change such as a Conditional Access policy, the user must use multifactor authentication | Gate 3: MFA now required; retry interactively |
| AADSTS50079 | UserStrongAuthEnrollmentRequired: MFA required, and the user must register security info (or a federated user needs the MFA claim from their identity provider) | Gate 3: MFA registration or federation |
| AADSTS50020 | UserUnauthorized: the account doesn't exist in this tenant and can't access the application; it must be added as an external user | Gate 3/guests: no guest account in the client's tenant |
| AADSTS50034 | UserAccountNotFound: the account must be added to the directory; may also mean the app chose the wrong tenant | Wrong tenant, or user not in it |
| AADSTS500011 | InvalidResourceServicePrincipalNotFound: the resource principal wasn't found in the tenant (not installed or consented, or request sent to the wrong tenant) | The enterprise application isn't there yet, or wrong tenant |
| AADSTS700016 | UnauthorizedClient_DoesNotMatchRequest: the application wasn't found in the directory/tenant (not installed, not consented, or wrong identifier or tenant) | Wrong client ID or tenant, or app not present |
| AADSTS7000112 | UnauthorizedClientApplicationDisabled: the application is disabled | Chapter 5's "Enabled for users to sign in?" set to No |
Who Is Affected? A Triage Table
Before opening any logs, the pattern of who fails already points at a gate. This is the most useful one-minute habit in the chapter.
| Pattern | Suspect first | Check |
|---|---|---|
| Every user, started at one moment | Credential expiry (Chapter 4), disabled app, tightened Conditional Access or revoked consent | Enterprise app Properties; audit logs around that time |
| Some users, others fine | Assignment (including nested groups), or a Conditional Access policy targeted at a group | Users and groups; the failed users' group membership; the CA tab of a failed event |
| Only new users | User consent disabled or tightened; the consent workflow with no reviewer | User consent settings; the admin consent workflow |
| Only guests or external staff | Guest account missing; cross-tenant inbound settings; untrusted MFA claim | The user's type in the client tenant; cross-tenant access settings |
| Only from one office or country | A location-based Conditional Access policy | The CA tab: which policy, and its named locations |
| Only background / API calls | Application permission consent missing; a workload-identity policy; secret expiry | Service principal sign-ins log; Permissions page |
| After a product update | New permission requested that the client hasn't consented to | The registration's API permissions vs the enterprise application's Permissions |
Hands-On Exercises
All three use fictional organisations and values. Never put real secrets, tokens or tenant details into practice notes.
For each situation, say which gate it points to (permissions/consent, assignment or conditions), the most likely single cause, and the first page you would ask the client to open: (a) only newly hired Fabrikam staff can't sign in to your product, while older staff can; (b) after your product's version 4.2 release, every Contoso user is prompted for consent and the first screen says approval is required; (c) 40 users in the "Sales" group fail, but the "Support Staff" group works, and Sales sits nested inside "All Staff" (the assigned group); (d) your server's nightly token request has been failing since Tuesday, with a service-principal sign-in showing "Access has been blocked due to Conditional Access policies."; (e) your own support engineer, signed in as a guest, sees AADSTS50020.
📄 View solutionBelow is a fictional extract of what the Contoso administrator showed you on a screen share, plus the error from the user's browser. Decide what is wrong and what is not wrong, naming each gate. Then say exactly what you would ask the administrator to do, and who in their organisation might have to approve it.
Write the one-paragraph reply you would send to a non-technical Fabrikam IT manager who asks, "Our security team just rolled out a rule requiring multifactor authentication for all cloud apps and now the nightly job that syncs data into your product fails, but users can still log in. Is your product broken?" Explain, in plain language, why a rule about MFA can stop a background job, which kind of identity the job is, what two things might need to happen on the Fabrikam side, and what you do not want them to do. Then list the three facts you would check first to decide which of two likely situations you are in.
📄 View solutionChapter 6 Quick Reference
- Three gates after valid credentials: permissions and consent (app), assignment (user), conditions (Conditional Access, MFA, guests)
- Delegated permissions (scopes) act for a signed-in user and reach only what both the permission and the user allow; application permissions (app roles) act with no user, need an administrator, and reach everything the permission covers
- User consent works only where the tenant allows it; if not, users aren't prompted and the admin consent workflow ("Approval required") may be the route
- Tenant-wide consent roles: Privileged Role Administrator for anything; Cloud Application / Application Administrator for everything except Graph application permissions
- Consent can vanish or be needed again: a new permission requested, consent revoked, re-consent replacing earlier grants, or tightened policy
- Where: Enterprise apps > <app> > Permissions (granted here); App registrations > <app> > API permissions (requested)
- Admin consent URL:
https://login.microsoftonline.com/{organization}/adminconsent?client_id={client-id} - Assignment: Assignment required = Yes means only assigned users/groups; group assignment needs Entra ID P1/P2; nested groups aren't covered
- Conditional Access is enforced after first-factor sign-in; read it at Entra ID > Conditional Access; check report-only and the sign-in log's Conditional Access tab
- Workload-identity policies can only block, cover single-tenant service principals only (not multitenant apps), and need Workload Identities Premium to change
- Guests: check the account exists, cross-tenant inbound settings, and whether MFA/device claims are trusted
- Codes: 65001/90094/65004 consent; 50105 assignment; 53003/50076/50079 Conditional Access/MFA; 50020/50034 account or tenant; 500011/700016/7000112 app missing or disabled
- Pattern of who fails points at the gate; ask the client to adjust the rule, never to switch off security