Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reauthentication required: run 'azd auth login' even after logging in #2659

Closed
weikanglim opened this issue Aug 24, 2023 · 0 comments · Fixed by #2664
Closed

reauthentication required: run 'azd auth login' even after logging in #2659

weikanglim opened this issue Aug 24, 2023 · 0 comments · Fixed by #2664
Assignees
Labels
authn bug Something isn't working

Comments

@weikanglim
Copy link
Contributor

Problem

After upgrading to the latest azd version, azd version 1.2.0 (commit 99ea7577f0df0df2ba34b677da189fafba18c0f7), I'm experiencing failures that follow the following pattern:

  1. Run azd <command>
  2. Command fails with reauthentication required: run 'azd auth login' to login
  3. Run azd auth login
  4. Login reports successful
  5. Run azd <command> again
  6. Command still fails with reauthentication required: 'run azd auth login' to login

Solution

  1. Run azd auth logout
  2. Run azd auth login

We're currently investigating options for fixing this without manual intervention.

@weikanglim weikanglim added bug Something isn't working authn labels Aug 24, 2023
@weikanglim weikanglim added this to the September 2023 - 1.3.0 milestone Aug 24, 2023
@weikanglim weikanglim self-assigned this Aug 24, 2023
@weikanglim weikanglim changed the title azd failing with "reauthentication required: run 'azd auth login'" even after logging in reauthentication required: run 'azd auth login' even after logging in Aug 24, 2023
weikanglim added a commit that referenced this issue Aug 29, 2023
When retrieving cache entries, automatically upgrade cache entries that were saved in msal cache v1.0 format to v1.1 format to avoid stale cache entries causing random auth failures.

For users that run both old and newer versions of azd (and consequently the msal libraries), both versions of the cli will work with the same cache file. In some corner cases where the old CLI has been most recently used to login, the refresh token may be ignored by the new cli with requires reauthentication. Otherwise, authentication is expected to work as normal without any unintentional side-effects.

Related to AzureAD/microsoft-authentication-library-for-go#453

Fixes #2659
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authn bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant