【发布时间】:2017-02-22 15:10:20
【问题描述】:
我正在探索 Azure Active Directory。我正在尝试查看是否可以使用我自己的登录页面和自定义用户 ID/密码控件来捕获用户凭据并针对 Azure AD 进行验证。我正在使用 ADAL.net 来实现这一点,但是我收到错误“parsing_wstrust_response_failed: Parsing WS-Trust response failed”。我在以下代码的最后一行收到此错误。
以下是我的代码:
string AppIdURL = ConfigurationManager.AppSettings["AppIdUrl"];
UserCredential uc = new UserPasswordCredential("testuser@domain.com", "test123");
AuthenticationContext aContext = new AuthenticationContext(System.Configuration.ConfigurationManager.AppSettings["AADInstance"]);
AuthenticationResult result = aContext.AcquireTokenAsync(AppIdURL, ConfigurationManager.AppSettings["ClientId"], uc).Result;
【问题讨论】:
标签: c# asp.net-mvc azure azure-active-directory adal