I'm having trouble accessing logs (or anything else) via az-cli.
i'm getting the below error
Get Token request returned http error: 400 and server response: {"error":"invalid_grant","error_description":"AADSTS50173: The provided grant has expired due to it being revoked. The user might have changed or reset their password. The grant was issued on '2017-12-18T08:55:26.4068276Z' and the TokensValidFrom date for this user is '2018-02-08T17:21:38.0000000Z'\r\nTrace ID: e9e2ef86-026a-4086-8664-bdf9abb80700\r\nCorrelation ID: d47582cd-0287-4f60-9dd9-a15621dd481b\r\nTimestamp: 2018-03-04 13:32:21Z","error_codes":[50173],"timestamp":"2018-03-04 13:32:21Z","trace_id":"e9e2ef86-026a-4086-8664-bdf9abb80700","correlation_id":"d47582cd-0287-4f60-9dd9-a15621dd481b"}
i've also tried getting a new token via az login - i go to the browser and paste the code and recieve confirmation from the site confirming my authentication. But i still get the errors
az --version
azure-cli (2.0.20)
acr (2.0.14)
acs (2.0.18)
appservice (0.1.19)
backup (1.0.2)
batch (3.1.6)
batchai (0.1.2)
billing (0.1.6)
cdn (0.0.10)
cloud (2.0.9)
cognitiveservices (0.1.9)
command-modules-nspkg (2.0.1)
component (2.0.8)
configure (2.0.12)
consumption (0.1.6)
container (0.1.12)
core (2.0.20)
cosmosdb (0.1.14)
dla (0.0.13)
dls (0.0.16)
eventgrid (0.1.5)
extension (0.0.5)
feedback (2.0.6)
find (0.2.7)
interactive (0.3.11)
iot (0.1.13)
keyvault (2.0.13)
lab (0.0.12)
monitor (0.0.11)
network (2.0.17)
nspkg (3.0.1)
profile (2.0.15)
rdbms (0.0.8)
redis (0.2.10)
resource (2.0.17)
role (2.0.14)
servicefabric (0.0.5)
sql (2.0.14)
storage (2.0.18)
vm (2.0.17)
Python location '/opt/az/bin/python3'
Extensions directory '/home/kj/.azure/cliextensions'
Python (Linux) 3.6.1 (default, Oct 18 2017, 20:41:18)
[GCC 4.8.4]
Legal docs and information: aka.ms/AzureCliLegal
Suggest do the following:
az account clearaz login using your latest password, the one you can login azure portalLet me know whether it works or not
Suggestion: embedding the solution steps in the error message would make it clearer.
//CC @marstr
CLI outputs similar solution text when detects the token file was corrupted, I am fine we can expand it to token refreshing failure or other AAD failures which are hard to decipher.
Not critical, but good things to do to save people's time.
Most helpful comment
Suggest do the following:
az account clearaz loginusing your latest password, the one you can login azure portalLet me know whether it works or not