Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

AADSTS65001: "The user or administrator has not consented to use the application" in Microsoft Entra ID

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

A sign-in fails with AADSTS65001: The user or administrator has not consented to use the application with ID '<App-ID>' named '<Name-of-App>'. Send an interactive authorization request for this user and resource. Microsoft's consent page says this happens "When an application tries to sign in or get an access token for a resource that hasn't been consented to by a user or admin".

Do not grant consent first. Microsoft's page lists nine reasons for an "admin approval" message and gives seven checks to find yours. Run them (all but step 6 only read), then grant consent for the right application and permissions. A separate Microsoft page documents how to revoke permissions that an administrator granted, and that revoke is given below as the way back.

What the error means

Microsoft's page "Troubleshoot consent issues in Microsoft Entra ID" (dated 2026-02-04) applies to OpenID Connect and OAuth2-based authentication. It notes that SAML-based applications "might present similar errors but require different solutions". Microsoft's error code reference (dated 2025-02-03) lists the code as "DelegationDoesNotExist - The user or administrator hasn't consented to use the application with ID X. Send an interactive authorization request for this user and resource."

The consent page lists these high-level scenarios behind such messages:

  • The User.Read permission is missing.
  • User consent is disabled at the tenant level.
  • User assignment is enabled for the application.
  • A service principal doesn't exist in the tenant for the client application.
  • A service principal doesn't exist in the tenant for the resource.
  • A consent URL that specifies prompt=admin_consent or prompt=consent is requested.
  • Scopes that haven't been consented to are requested in a sign-in request.
  • The scope or permission requires admin consent.
  • User consent is blocked for risky applications.

The page also explains the model: "Simply adding permissions to an application registration doesn't consent to the permissions. To consent to permissions, you must assign permissions to the service principal." Delegated permissions are for when users sign in, and application permissions are for when the service principal is used to authenticate through the client credential flow.

Likely causes

Cause What you see How to confirm
User consent is not allowed in the tenant Users always get "Need admin approval" Enterprise applications, Consent and permissions: "Do not allow user consent" is selected
The application has no service principal in the tenant Consent screen or error on first use Enterprise applications, All Applications, search for the App-ID: not found
Assignment required is on Admin approval is needed even for a known app The application's Properties show Assignment required
The request asks for scopes that were never consented to The same error after an admin "already consented" The scopes in the sign-in request are missing from the application's Permissions pane
The sign-in request carries a prompt parameter Users keep getting a consent error The request contains prompt=consent or prompt=admin_consent

Prove the cause before changing anything

Steps 1 to 5 and 7 only read; step 6 loads a request in a browser, so do not accept any consent prompt it shows. Microsoft's page orders them as steps.

  1. Capture the sign-in request. In a browser, read the address bar. If there is no address bar, Microsoft says to use an HTTP capture tool like Fiddler. Note the client_id, scope, resource and prompt values.
  2. In the Azure portal, go to Microsoft Entra ID, then Enterprise applications, then Consent and permissions, and read the "User consent for applications" setting. If "Do not allow user consent" is selected, "users will always receive the 'Need admin approval' message".
  3. Under Enterprise applications, set Application Type to All Applications and search for the App-ID. Microsoft says: "If the application isn't found, this is why you experience consent issues."
  4. Select the application, open Properties under Manage, and read Assignment required.
  5. Open the application's Permissions pane and compare it with the scope in the sign-in request. Microsoft says the permissions listed there "are those that have been consented to", and that openid, email, profile and offline_access are generally not listed in enterprise applications.
  6. Check whether the resource exists in the tenant, using the request form Microsoft gives. Errors AADSTS650052, AADSTS650057 and AADSTS500011 mean different faults and have their own explanations in the page.
  7. Check whether the request carries a prompt parameter.

Then read the Microsoft Entra audit logs for the failure. Microsoft's filters: Category ApplicationManagement, Status Failure, Activity "Consent to application". Select the application that failed and read the STATUS REASON. The page notes one status reason, "Microsoft.Online.Security.UserConsentBlockedForRiskyAppsException", that needs admin consent even when the tenant allows users to consent.

Example (illustrative): at contoso.com.au an in-house reporting tool, with the sample ID Microsoft uses, 00001111-aaaa-2222-bbbb-3333cccc4444, fails for every user with AADSTS65001. Step 2 shows "Allow user consent for apps", step 3 finds the application, step 4 shows Assignment required is off, and step 5 shows the Permissions pane lacks Directory.Read.All, which the request asks for. The missing permission is the cause, so admin consent for that permission is the fix, after the vendor explains what it allows.

Fix

A prompt parameter in the sign-in request

Microsoft's step 7 says that once the application obtains consent, the prompt parameter must not be specified, "Otherwise, users might always receive a consent error." This changes the application's request, so it belongs to the application owner.

Before you change it, copy the sign-in request as it stands into a note.

Risk: the next step edits the sign-in request the application sends, for every user of that application, and a wrong edit stops sign-in.

Remove the prompt=consent (or prompt=admin_consent) part from the sign-in request and leave the other parameters unchanged, as Microsoft's example does.

To undo it, put the copied request back.

Missing permissions or no consent in the tenant: administrator consent

Microsoft's "Perform admin consent" section says to have an administrator, "a user with the Global Administrator, Company Administrator, or Application Administrator role", access the application, and if the consent screen appears, read the requested permissions and select the "Consent on behalf of your organization" checkbox. If the administrator isn't sure what the permissions allow, Microsoft says the administrator "must work with the application vendor to understand the permissions and their use."

Before you change it, record the application's current Permissions pane (step 5 above) and the exact scopes in the sign-in request.

Risk: the next steps grant the application the requested permissions for the whole organisation, not only for you. Confirm the application ID, the tenant and each requested permission first, and keep the permissions you recorded so you can tell which grant to revoke.

  1. Sign in as an administrator in one of the roles above, and open the application through its own sign-in address.
  2. When the consent screen appears, read each permission.
  3. If you accept them, select "Consent on behalf of your organization" and accept.

Microsoft adds two cases. If the administrator doesn't get the consent screen, add &prompt=consent to the end of the sign-in address to perform admin consent, which is the purpose Microsoft's page gives for prompt=consent. And an admin consent URL has the form https://login.microsoftonline.com/<Tenant-ID>/adminconsent?client_id=<App-ID>, which works only when the permissions are already configured on the application registration.

Microsoft's page "Review permissions granted to enterprise applications" (dated 2025-03-06) says you can revoke permissions granted by admins for your entire organisation, and that the roles needed are Cloud Application Administrator or Application Administrator. That is the way back from the consent above. Before you revoke, write down every permission listed in the application's Admin consent tab, and mark the ones you granted in this step.

Risk: the next steps remove consent for the whole organisation, so sign-in that depends on the revoked permission fails for every user of the application. Revoking a permission the application held before you granted anything breaks the access it already had.

To undo the consent, revoke only the permissions you granted in this step:

  1. Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.
  2. Browse to Entra ID > Enterprise apps > All applications and select the application.
  3. Select Permissions, then the Admin consent tab.
  4. Choose a permission you marked as granted in this step and select the "..." control for that permission.
  5. Select Revoke permission.

Microsoft's page says you can't revoke permissions in the User consent tab using the portal; for those it points to Microsoft Graph API calls or PowerShell cmdlets. To put a revoked permission back, the same page points to a separate page, "Restore revoked permissions", which is not described here. Permissions the application owner has not configured on the registration are for the owner to add, because "Permission scopes used by the application must be provided by the application owner."

Assignment required

If Assignment required is on, Microsoft says an administrator must consent to the application. Consenting does not give every user access: "You must follow the user assignment rules. Only those users assigned to the application can access it." Microsoft names one workaround, which is to turn Assignment required off, let users consent when they access the application, and turn it back on. Users could reach the application while it is off.

Confirm the fix

  • Sign in again to the application with the same account. AADSTS65001 should not appear.
  • Open the application's Permissions pane in Enterprise applications. The permissions you approved should be listed as consented.
  • Repeat the audit log filter above. A new "Consent to application" entry with Status Failure should not appear.

What to watch afterwards

  • A new permission added later by the application owner. Microsoft's page says adding permissions to an application registration does not by itself consent to them.
  • The prompt parameter returning in a new release of the application.
  • Users who are not assigned. Microsoft says consent for the organisation does not grant them access.
  • Risky-application blocks. Microsoft lists AADSTS900941 (Administrator consent is required, app considered risky) as a separate message.

Risks and limits

These steps have not been run or lab-tested.

Microsoft's page is written for OpenID Connect and OAuth2 and says SAML needs different solutions. The consent page does not itself describe withdrawing consent; the revoke steps come from the separate permissions page, which covers only permissions in the Admin consent tab in the portal. Neither page says how long a granted consent takes to apply, or how Conditional Access interacts with consent. If all seven checks pass and the error continues, Microsoft's page names no further cause.

Sources