Forum Discussion

MichaelR1600's avatar
MichaelR1600
Copper Contributor
Aug 27, 2024

Azure Sign-In Filed: Error code: AADSTS50139

Hi All,

 

When I attempt to authenticate into Azure, I receive the Error code: AADSTS50139. 

 

The Error message: AADSTS50139: Session is invalid due to missing an external refresh token.

 

I do not have access to Azure AD and the resolution, I believe, is beyond my capacity. I have contacted 

Microsoft at (800)-642-7676, Microsoft Support and Azure Support on X, utilized the Azure self help portal, and attempted various login attempts. This probably needs to be resolved by a live representative, but I cannot connect with or get any live support. Does anyone have any suggestions?

 

Thanks, Michael

 

Here are some potential causes and solutions:

 

  1. Mismatched Redirect URI:

    • Cause: The redirect URI provided in the request does not exactly match the one registered in Azure AD for the application.
    • Solution: Ensure that the redirect URI in the application configuration matches exactly with what is registered in Azure AD, including the scheme (http/https), domain, path, and port.
  2. Incorrect Configuration in Azure AD:

    • Cause: The application is not correctly configured in Azure AD, or the redirect URI is missing or incorrect in the Azure AD app registration.
    • Solution: Check the Azure AD app registration and make sure the correct redirect URIs are listed under the "Authentication" section. Add the correct URI if it's missing.
  3. Case Sensitivity:

    • Cause: Azure AD is case-sensitive for the redirect URI.
    • Solution: Make sure that the case of the redirect URI in the application matches exactly with what is registered in Azure AD.
  4. Application Type Mismatch:

    • Cause: The type of application (web, mobile, etc.) may not be set up correctly.
    • Solution: Verify that the application type in Azure AD matches the type of application you are developing. For example, ensure that it's set to "Web" for web applications and "Native" for mobile or desktop applications.
  5. Invalid or Missing Permissions:

    • Cause: The application may not have the correct permissions or scopes configured in Azure AD.
    • Solution: Check the API permissions under the Azure AD app registration and ensure that the necessary permissions are granted and admin-consented if required.

 

Resources