Forum Discussion
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:
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.
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.
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.
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.
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.
- EricStarkerCommunity Manager
Hello! You've posted your question in the Tech Community Discussion space, which is intended for discussion around the Tech Community website itself, not product questions. I'm moving your question to the Azure space - please post Azure questions here in the future. (You can find this and other product discussion spaces in the future through the Community Hubs page.)
- MichaelR1600Copper ContributorEricStarker
Thank you for letting me know about that resource and for taking that action. I resolved the issue, but I can post there in the future.