在下面的this example中,按照以下步骤操作,我出现了错误:
第1步:克隆或下载此存储库
步骤2 :(可选)向您的Azure Active Directory租户注册示例
选择要在其中创建应用程序的Azure AD租户
注册客户端应用程序(在控制台上)
步骤3:配置示例以使用您的Azure AD租户
运行应用程序:
Enter your username
anyuser@outlook.com
Enter your password (no backspace possible)
*********
Response status code does not indicate success: 406 (NotAcceptable).
Press any key to exit
Enter your username
anyuser@msn.com
Enter your password (no backspace possible)
*********
Response status code does not indicate success: 406 (NotAcceptable).
Press any key to exit
我将“支持的帐户类型”中的设置更改为以下设置,但出现了相同的错误
Accounts in any organizational directory and personal Microsoft accounts (e.g. Skype, Xbox, Outlook.com)
Enter your username
anyuser@outlook.com
Enter your password (no backspace possible)
*********
Response status code does not indicate success: 406 (NotAcceptable).
Press any key to exit
有什么主意吗?
anyuser@outlook.com
具有管理员权限
答案 0 :(得分:2)
您似乎正在尝试使用个人Microsoft帐户。不适用于该身份验证流程。
密码授予(也称为资源所有者密码凭据授予流)仅适用于Azure AD用户,没有MFA以及未联盟的用户。而且密码一定不能过期。