我在我的代码中使用ADAL。我想要使用不同的凭证,这样我就可以在控制台程序中授权不同的用户对Azure AD进行授权。
这是我用来创建用户凭据的代码行。我使用NuGet获取最新的ADAL。然而,此行显示错误:
"The best overloaded method match for 'Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential.UserCredential(string, Microsoft.IdentityModel.Clients.ActiveDirectory.UserAuthType)' has some invalid arguments"
根据https://msdn.microsoft.com/en-us/library/microsoft.identitymodel.clients.activedirectory.usercredential.aspx的说明:
Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential cred = new Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential("username", "password");
这是我用来创建用户凭据的代码行。我使用NuGet获取最新的ADAL。然而,此行显示错误:
"The best overloaded method match for 'Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential.UserCredential(string, Microsoft.IdentityModel.Clients.ActiveDirectory.UserAuthType)' has some invalid arguments"
根据https://msdn.microsoft.com/en-us/library/microsoft.identitymodel.clients.activedirectory.usercredential.aspx的说明:
UserCredential(String, String)
Constructor to create credential with client id and secret
有人知道我做错了什么吗?
谢谢