kumar
kumar

Reputation: 9387

Unattended authentication using Azure Active Directory- UserCredential not accepting username and password

I was following the example given below to accomplish unattended authentication to Azure management APIs with Azure Active Directory.

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

In the latest Microsoft.IdentityModel.Clients.ActiveDirectory 3.10.305231913 UserCredential Class does not accept user and password. In the older version say v2.18.0.0 UserCredential class does accept username and password. I am not sure in which version this was deprecated.

How do I accomplish this in the latest version? Most of the articles I have come across seem to refer older one.

Upvotes: 0

Views: 307

Answers (1)

cuongle
cuongle

Reputation: 75306

You should use UserPasswordCredential instead of UserCredential with new version ADAL 3.0

UserPasswordCredential is inherited from UserCredential which accepts both username and password.

Upvotes: 0

Related Questions