msfriese
msfriese

Reputation: 131

Active Directory Authorization in ASP.Net Core without password

I want to authenticate a user via Active Directory. Right now I use Novell.Directory.Ldap.NETStandard library for that.

Scenario: The user will type in his e-mail and password. What I have to do now is to connect to AD via LDAP using some service login (username, password) so i can search in AD. I will search for the e-mail, find the user and then validate his credentials.

What I am asking for: I do not want to use a username & password to log a service user into AD. I would like to use the authorization of the user that is running the application to connect and search in AD. I am thinking of something similar to a SQL connection where I can say Integrated Security=True;.

Is there a way to do this in ASP.Net Core?

Upvotes: 0

Views: 355

Answers (1)

msfriese
msfriese

Reputation: 131

Solved it! I was using the wrong library.

I'm now using Microsoft's implementation from here: System.DirectoryServices.AccountManagement;

Works great.

Upvotes: 0

Related Questions