AD roles from a username

Discussion in 'ASP .Net Security' started by thomas.solbjor@gmail.com, Oct 13, 2005.

  1. Guest

    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?
     
    , Oct 13, 2005
    #1
    1. Advertising

  2. 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.

    <> wrote in message
    news:...
    > 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?
    >
     
    Joe Kaplan \(MVP - ADSI\), Oct 13, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luqman
    Replies:
    1
    Views:
    475
    Cowboy \(Gregory A. Beamer\)
    Nov 24, 2006
  2. Jéjé
    Replies:
    0
    Views:
    259
    Jéjé
    Sep 27, 2005
  3. Luqman
    Replies:
    1
    Views:
    114
    Brad Kingsley
    Dec 7, 2006
  4. JaiPrakash Sharma

    Roles.GetRolesForUser(UserName) returning zero-dimension array

    JaiPrakash Sharma, Jan 30, 2008, in forum: ASP .Net Security
    Replies:
    1
    Views:
    234
    Misbah Arefin
    Feb 4, 2008
  5. Shailesh Patel
    Replies:
    0
    Views:
    488
    Shailesh Patel
    Nov 8, 2006
Loading...

Share This Page