question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`az login --use-device-code` fails: AADSTS70020: The provided value for the input parameter 'device_code' is not valid. This device code has expired.

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az login

Errors:

AADSTS70020: The provided value for the input parameter 'device_code' is not valid. This device code has expired.
Trace ID: a8f3578e-d4cb-44ac-91a8-64c1322d6f00
Correlation ID: ed438693-0685-4cfe-923e-b73b5cd759e5
Timestamp: 2022-05-03 08:56:46Z

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here…
  • az login -t {} --use-device-code

Tried many times. Worked fine last week so I tried with 2.35.0. Same result.

Expected Behavior

Succesfull login. Or at least a device code that doesn’t expire after 1-5 seconds.

Environment Summary

Linux-5.17.5-arch1-1-x86_64-with-glibc2.35, Arch Linux
Python 3.10.4
Installer: 

azure-cli 2.36.0 and 2.35.0

Additional Context

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
usrmecommented, May 4, 2022

No longer having issues! ✔️

1reaction
jiaslicommented, May 3, 2022

This issue has been mitigated by AAD service team. Please retry az login --use-device-code and let us know if you can get unblocked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OAuth2 Error AADSTS90132: Device Code is not valid
AADSTS90132: The provided value for the input parameter 'device_code' is not valid. Device codes supporting the personal Microsoft Account ...
Read more >
AADSTS7000014: The provided value for the input parameter ...
The PublicClientApplication object contain clientId (from the azureAD panel) and authority (https://login.microsoftonline.com/consumers) ...
Read more >
How to log in to the Azure account using Az CLI command in ...
Once you type the az login command, it will prompt for the Azure portal login console. If you need to log in with...
Read more >
How Device Code Flow works in Azure AD - Joonas W's blog
In-depth walkthrough on the device code authentication flow which can be used by browserless and input-limited devices.
Read more >
Infrastructure as Code - An intro - Part 2 - Using Azure CLI
The following tenants require Multi-Factor Authentication (MFA) Use 'az login –tenant TENANT_ID' to explicitly login to a tenant. The reason for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found