【问题标题】:unattened authentication using Azure Active Directory- UserCredential not accepting username and password使用 Azure Active Directory 的无人值守身份验证 - UserCredential 不接受用户名和密码
【发布时间】:2016-06-22 13:20:44
【问题描述】:

我按照下面给出的示例使用 azure 活动目录完成对 azure 管理 API 的无人值守身份验证。

https://blogs.msdn.microsoft.com/tomholl/2014/11/24/unattended-authentication-to-azure-management-apis-with-azure-active-directory/

在最新的 Microsoft.IdentityModel.Clients.ActiveDirectory 3.10.305231913 UserCredential 类中不接受用户和密码。在旧版本中说 v2.18.0.0 UserCredential 类确实接受用户名和密码。不确定在哪个版本中已弃用。

如何在最新版本中实现这一点。我遇到的大多数文章似乎都引用了较旧的文章。

谢谢

【问题讨论】:

    标签: azure azure-active-directory


    【解决方案1】:

    对于新版本 ADAL 3.0,您应该使用 UserPasswordCredential 而不是 UserCredential

    UserPasswordCredential 继承自 UserCredential,它接受用户名和密码。

    【讨论】:

      猜你喜欢
      • 2015-10-18
      • 1970-01-01
      • 1970-01-01
      • 2021-02-11
      • 1970-01-01
      • 1970-01-01
      • 2015-01-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多