Asked by:
Authentication using Active directory

Question
-
User-815650111 posted
Hello everyone,
I want to authenticate users using active directory, after hours and hours spent surfing on the internet i didn't find anything useful for me.
If anyone can help me with pieces of code or example i'll appreciate it a lot, because i have no idea where i can start from.
Best regards,
Leo
Tuesday, February 12, 2019 8:03 AM
All replies
-
User197322208 posted
Please read - https://docs.microsoft.com/en-us/aspnet/core/security/authentication/windowsauth?view=aspnetcore-2.2&tabs=visual-studio
It is , mostly, a devops thingy.
Tuesday, February 12, 2019 10:41 AM -
User-815650111 posted
Thanks, but it isn't what i am looking for, i need a classic login page and check the username and pass which are stored in my AD server
Tuesday, February 12, 2019 1:05 PM -
User753101303 posted
Hi,
Then you could use https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.accountmanagement.principalcontext.validatecredentials?view=netframework-4.7.2 to validate the password against AD which I assume is the main blocking point ?
You could also have a look at https://docs.microsoft.com/en-us/aspnet/identity/overview/extensibility/overview-of-custom-storage-providers-for-aspnet-identity (maybe oveerkil)
Tuesday, February 12, 2019 1:29 PM -
User-815650111 posted
Sorry if my english is bad, however i need a sort of form which the user have to insert his username and pass, after the validation of the credentials the user can navigate only in some sections, such as view details of something but not edit, ex: sample user, while admin can do everything. A sort of backend which allows to indicate which domain users can access with specific privileges
Tuesday, February 12, 2019 3:02 PM -
User-474980206 posted
see this thread:
https://stackoverflow.com/questions/10279140/configure-asp-net-mvc-for-authentication-against-ad
Tuesday, February 12, 2019 4:43 PM