I receive this error code trying to log in to Azure. "Sign-in failed Error code: AADSTS50139 Error message: AADSTS50139: Session is invalid due to missing an external refresh token. "

Anthony Richard 0 Reputation points
2024-10-08T23:40:27.3+00:00

When trying to log into my Azure account via the Azure portal, I receive an error message and I don't know how to fix it. Please help. Below is the error message I recieved.

Sign-in failed

Error code: AADSTS50139

Error message: AADSTS50139: Session is invalid due to missing an external refresh token. Trace ID: 4a50771c-378b-4f24-952d-5d1f3af26100 Correlation ID: d56686ae-63cf-47a4-b12a-e8f17ec67369 Timestamp: 2024-10-08 23:36:48Z

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,744 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vinodh247 23,581 Reputation points MVP
    2024-10-09T00:14:08.35+00:00

    Hi Anthony Richard,

    Thanks for reaching out to Microsoft Q&A.

    The error code AADSTS50139 typically indicates an issue with missing or expired refresh tokens, which are used to maintain an authenticated session without requiring the user to log in repeatedly. Here are a few steps to resolve this issue:

    1. Clear your browser cache and cookies: Sometimes, cached session data in your browser can cause issues. Try clearing your browser cache and cookies, then attempt to sign in again.
    2. Use an Incognito browsing session: Open a private browsing window (Incognito/InPrivate) to ensure that no session or cookie information from previous logins interferes with the authentication process.
    3. Log out and log back in: If you're using multiple Azure accounts or have had several sessions open, fully log out from all Azure sessions and log in again.
    4. Check conditional access policies: If your organization uses conditional access policies, ensure that your login attempt meets all the requirements. Sometimes, an expired or invalid session can result from failing to meet such policy conditions (ex: MFA requirements).
    5. Update or re-authenticate external tokens: If you're using an external authentication provider (like Google or Facebook for single sign-on), you may need to re-authenticate or reconnect that account to Azure to refresh the token.
    6. Try a different device or network: Sometimes network or device-specific issues can prevent token refresh. Switching to another device or network can help isolate the problem.

    Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.