An API that connects multiple Microsoft services, enabling data access and automation across platforms
AADSTS50011 means the redirect_uri in the admin consent request does not exactly match a redirect URI configured on the app registration.
For the Microsoft identity platform admin consent endpoint, redirect_uri is required and it must exactly match one of the redirect URIs registered for the app.
Use this checklist:
- In Microsoft Entra admin center, open App registrations and select app
e535e657-0666-4ad5-940a-c3cf6296a541. - Check the app’s configured Redirect URIs.
- Compare them to the URI in the error:
https://aad.portal.azure.com/TokenAuthorize/ExtensionName/Microsoft_AAD_RegisteredApps - If granting consent from a copied or manually built URL, verify these values in the request:
-
tenantis the correct tenant ID or domain -
client_idmatches the intended app -
redirect_uriexactly matches a registered redirect URI -
scopeis the expected scope
-
- If the consent URL was provided by an app owner, verify the
client_idbefore using it. Do not grant consent from a copied URL unless that value is confirmed.
If the portal flow is generating this redirect URI and it is not registered on the app, use an alternative consent path:
- Go to Microsoft Entra admin center → App registrations → select the app → API permissions.
- Select Grant admin consent.
- If the portal consent page still fails, manually build the consent URL using the Microsoft identity platform admin consent endpoint and a
redirect_urithat is already registered for the app.
Admin consent endpoint format:
https://login.microsoftonline.com/{tenant}/v2.0/adminconsent
?client_id={application-client-id}
&scope=https://graph.microsoft.com/.default
&redirect_uri={registered-redirect-uri}
&state={optional-state}
Important validation points:
- Do not use
commonfor admin consent. -
redirect_urimust exactly match a registered value. - For SharePoint Embedded guidance, the expected Graph scope in the admin consent URL is
.default; if a different scope is used, confirm why.
If this is a multitenant app and consent has not yet been granted in the tenant, the service principal may not exist locally until an admin completes consent.