Azure中的身份验证错误 [英] Authentication error in Azure
问题描述
大家好,
我正在尝试运行一个具有ARMCLIENT并使用身份验证的PS脚本. (启用了MFA)
armclient获得"/subscriptions/$subscriptionID/providers/Microsoft.OperationalInsights/workspaces?api-version=2015-03-20"" ;
我做了什么:-
在使用"login-azurermaccount"运行此脚本之前,我已经登录了PSsession.
之后,我正在运行此脚本,现在可以看到两个不同的错误:-
错误1:-
远程服务器返回错误:(400)错误的请求.
AADSTS70002:验证凭据时出错. AADSTS70008:由于不活动,刷新令牌已过期.ÿ令牌于2018年发行,
06-11T16:45:03.5238738Z并且在90.00:00:00处于非活动状态.
跟踪ID:c9ada1bb-ccbb-4b26-b562-296e68bb2e00
相关编号:9ba07425-734c-4d9c-bd50-0737d8475bc7
时间戳:2018-09-24 12:05:25Z
错误2:-
远程服务器返回错误:(400)错误的请求.
AADSTS50173:提供的赠款已被吊销,因此已过期.用户可能已更改或重置了他们的密码.该授予已于'2018-07-25T09:19:37.9620000Z'上发布,此用户的TokensValidFrom日期为'2018-09-10T00:29:55.0000000Z'
跟踪ID:18160474-ab3d-4096-875c-a362f4b63a00
相关ID:ca408826-fed1-4571-92c1-19ac691b9926
时间戳记:2018-09-24 11:37:47Z
仅供参考...几天前它运行良好.但是,自从我更改了密码后,它就无法使用了.但是我可以运行其他没有armclient的脚本. (例如get-azurermvm等) 甚至我都可以使用新的凭据和令牌访问门户.
不知道这里发生了什么!
干杯,古拉夫请记住,如果有帮助,请将其标记为答案.
我建议您执行以下操作:
1. az帐户清除
2.尝试使用您的最新密码进行az登录,您可以使用该密码登录azure门户.看看是否有帮助.------------------------------------------------- -------------------------------------------- >
如果此答案有帮助,请单击标记为答案"或上投票".提供其他反馈 在您的论坛体验上,点击 armclient get "/subscriptions/$subscriptionID/providers/Microsoft.OperationalInsights/workspaces?api-version=2015-03-20"
What i done:-
I have login PSsession before running this script using "login-azurermaccount"
After it I am running this script and now what i can see there are two differ errors:-Error 1:-
The remote server returned an error: (400) Bad Request.
AADSTS70002: Error validating credentials. AADSTS70008: The refresh token has expired due to inactivity.ÿThe token was issued on 2018-
06-11T16:45:03.5238738Z and was inactive for 90.00:00:00.
Trace ID: c9ada1bb-ccbb-4b26-b562-296e68bb2e00
Correlation ID: 9ba07425-734c-4d9c-bd50-0737d8475bc7
Timestamp: 2018-09-24 12:05:25ZError 2:-
The remote server returned an error: (400) Bad Request.
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 '2018-07-25T09:19:37.9620000Z' and the TokensValidFrom date for this user is '2018-09-10T00:29:55.0000000Z'
Trace ID: 18160474-ab3d-4096-875c-a362f4b63a00
Correlation ID: ca408826-fed1-4571-92c1-19ac691b9926
Timestamp: 2018-09-24 11:37:47Z
FYI... Earlier it was running fine before some days. But since when i have changed my password it is not working. However i can run can other scripts which do not have armclient in it. (like get-azurermvm etc.) even i can access portal using my new credentials and token.
Not sure what is happening here!
Cheers, Gourav Please remember to mark the replies as answers if it helped.
解决方案I would Suggest you to do the following:
1. az account clear
2. Try az login using your latest password, the one you can login azure portal. See if it helps.---------------------------------------------------------------------------------------------
If this answer was helpful, click "Mark as Answer" or "Up-Vote". To provide additional feedback on your forum experience, click here
这篇关于Azure中的身份验证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!