AD roles from a username

T

thomas.solbjor

Hi,

I have custom membership database which I want to add members to
automaticcally based on AD username.

I have a database with a list of users and their AD username. I want to
loop these users and query AD to get their roles based on just their
username. Alle the samples I have found related to this is based on
haveing both username and password and authenticate the user before
getting the users roles.

To summarise: Is there a way of getting the user's roles when all I
have is their username?
 
J

Joe Kaplan \(MVP - ADSI\)

In order to access AD and search it successfully, you need credentials that
have access to it, much like you need credentials to access a remote SQL
server.

You do not need the credentials of each user object you wish to access, you
just need one set of credentials that has the rights to read the data you
want. Typically, the data you want from AD is available to normal users, so
a single service account in the domain should be adequate for your needs.

Joe K.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top