|
| 1 | +--- |
| 2 | +title: Error AADSTS50000 - There was an error issuing a token or an issue with our sign-in service |
| 3 | +description: Provides a solution to the AADSTS50000 error that occurs when you try to sign in to an Azure app using Microsoft Entra ID. |
| 4 | +ms.service: entra-id |
| 5 | +ms.date: 03/12/2025 |
| 6 | +ms.author: bachoang |
| 7 | +ms.custom: sap:Issues Signing In to Applications |
| 8 | +--- |
| 9 | + |
| 10 | +# troubleshooting Azure AD token acquisition errors |
| 11 | + |
| 12 | +The AADSTS50000 error can occur during the authentication process or token acquisition flow using the token endpoint. Multiple causes can lead to these errors, and this article provides common scenarios and their resolutions. |
| 13 | + |
| 14 | +## Symptoms |
| 15 | + |
| 16 | +When an user try to sign in to an application that's integrated into Microsoft Entra ID, the user receive the following error message: |
| 17 | + |
| 18 | +> AADSTS50000: There was an error issuing a token or an issue with our sign-in service. |
| 19 | +
|
| 20 | +## Cause 1: The user password is expired, invalid, or out of sync |
| 21 | + |
| 22 | +This issue is common in hybrid environments. The user's federated account password may be out of sync between the on-premises Active Directory and Microsoft Entra ID. Additionally, this can also occur when a user session is being revoked. |
| 23 | + |
| 24 | +### Solution for cause 1 |
| 25 | + |
| 26 | +Reset the user password, and then verify the new password can authenticate successfully to Microsoft Entra ID. |
| 27 | + |
| 28 | +## Cause 2: Parameters are incorrectly configured in the token acquisition request |
| 29 | + |
| 30 | +The issue commonly occurs in the on-behalf-of (OBO) flow. Certain parameters required for token acquisition may be missing or invalid. |
| 31 | + |
| 32 | +### Solution for cause 2 |
| 33 | + |
| 34 | +Make sure the client ID is valid and other required parameters are configured correctly. For more information, see [Microsoft identity platform and OAuth 2.0 On-Behalf-Of flow](/entra/identity-platform/v2-oauth2-on-behalf-of-flow). |
| 35 | + |
| 36 | +## Cause 3: Consent-related issues |
| 37 | + |
| 38 | +The error you're referring to occurs during the OAuth2 device authorization grant flow when making a request to the token endpoint. After the user signs in to a browser window and accepts the consent dialog, this error occurs. |
| 39 | + |
| 40 | +### Solution 3 for cause 3: verify application consent settings |
| 41 | + |
| 42 | +1. Go to the [Azure portal](https//portal.azure.com), make sure that the client application (Service Principal) exists in the tenant's **Enterprise Applications** page. You can seearch for the application by App ID. |
| 43 | +2. Verify that the user has the ability to consent to the application. Check user settings in the **Enterprise Applications** page or review relevant policies affecting user consent. |
| 44 | + |
| 45 | +## Cause 4: Symmetric signing key is used in the application or service principal object |
| 46 | + |
| 47 | +Microsoft Identity Platform (v2 endpoint) tokens must be signed by a certificate (asymmetric key). Errors may occur if a symmetric signing key is used. |
| 48 | + |
| 49 | +### Solution for cause 4 |
| 50 | + |
| 51 | +#### Step 1: Check if symmetric key is used in application object |
| 52 | + |
| 53 | +1. In the Azure portal, go to the **App Registrations**. |
| 54 | +2. In the **Manage** section, select **Manifest**. |
| 55 | +3. Check if there is an entry in the `keyCredentials` section with `type=Symmetric` and `usage=Sign`. |
| 56 | + |
| 57 | + :::image type="content" source="./media/error-code-aadsts50000-issuing-token-sign-in-service/manifest-sample.png" alt-text="Application Manifest Key Credentials" lightbox="/media/error-code-aadsts50000-issuing-token-sign-in-service/manifest-sample.png"::: |
| 58 | + |
| 59 | +Alternatively, use the AzureAD PowerShell cmdlet [Get-AzureADApplicationKeyCredential](https://docs.microsoft.com/en-us/powershell/module/azuread/get-azureadapplicationkeycredential?view=azureadps-2.0) to retrieve key credentials. |
| 60 | + |
| 61 | +#### Step 2: Check if symmetric key is used in service principal object |
| 62 | + |
| 63 | +1. If the application is not found in the **App Registrations** page in the Azure portal, browse to the **Enterprise Applications** page. |
| 64 | +2. Locate the application, and then get the **Object ID** of the Service Principal. |
| 65 | +3. Use the AzureAD PowerShell cmdlet [Get-AzureADServicePrincipalKeyCredential](https://docs.microsoft.com/en-us/powershell/module/azuread/get-azureadserviceprincipalkeycredential?view=azureadps-2.0) to retrieve key credentials. |
| 66 | + |
| 67 | +#### Step 3: Remove symmetric signing key |
| 68 | + |
| 69 | +If the symmetric key exits, use: |
| 70 | + |
| 71 | +- [Remove-AzureADApplicationKeyCredential](/powershell/module/azuread/remove-azureadapplicationkeycredential?view=azureadps-2.0) to remove the symmetric key for the app registration. |
| 72 | +- [Remove-AzureADServicePrincipalKeyCredential](/powershell/module/azuread/remove-azureadserviceprincipalkeycredential?view=azureadps-2.0) to remove the symmetric key for the service principal object. |
| 73 | + |
| 74 | +If a signing key is required, use a signing certificate instead. For more information, see [SAML-based single sign-on: Configure a signing certificate](/graph/application-saml-sso-configure-api?tabs=http%2Cpowershell-script#step-6-configure-a-signing-certificate) |
| 75 | + |
| 76 | +## Cause 5: No delegated permission exposed in the resource application (web API) |
| 77 | + |
| 78 | +This error can occur in the following scenario: |
| 79 | + |
| 80 | +- You have a multi-tenant resource application registered in tenant A. This application exposes only **Application Permission** type. |
| 81 | +- In a different tenant B, you have a client application registered. In the **API permission** page for this application, you configure the permission for the resource application registered in the other tenant. |
| 82 | +- Then, you use use an OAuth 2 delegated grant flow (for instance auth code grant flow) to request an access token for the resource app using the `/.default` for the web API scope. |
| 83 | + |
| 84 | +### Solution for cause 5 |
| 85 | + |
| 86 | +Configure the resource application to expose delegated permission and consent to that delegated permission in the client application. |
0 commit comments