I have a set of users in azure active directory; in my program I will collect the user name and password of an end user, and want to check against windows azure active directory.
Is it possible? Please provide some reference.
I know we can validate using Power-shell cmdlets; I want to know if there is any other way to validate user credentials.
In case someone is still looking for an answer.
Support for authenticating user without opening a new window for user cred was added in ADAL version 2.7.10707.1513-rc through providing an object of class UserCredential
to an overloaded function of AcquireToken
.
public AuthenticationResult AcquireToken(string resource, string clientId, UserCredential userCredential);
Here is a sample code for powershell.
$UserCred = new-object Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential("****@*****", "*****")
$result = $AuthContext.AcquireToken($resource,$clientID,$UserCred)
Ah, I think, you're trying to implement a SSO scenario. Try Adding Sign-On to Your Web Application Using Windows Azure AD! And if your customer does not have an Azure subscription, this Multi-Tenant Cloud Application for Windows Azure Active Directory sample describes the details with using Azure Active Directory Authentication Library. Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With