Markus O'Reilly
Markus O'Reilly

Reputation: 841

LDAP Active Directory path

I am trying to add a user to Active Directory through an MPS Web Service. I've been trying a long time to find the correct LDAP-url to use to tell it to add the new user to the Users group. I've tried things like:

LDAP://XXXX.YYY/OU=Users,DC=XXXX,DC=YYY
LDAP://XXXX.YYY/CN=Users,DC=XXXX,DC=YYY
LDAP://XXXX.YYY/DN=Users,DC=XXXX,DC=YYY

It seems the "farthest" I've gotten is an error that says I have given it an invalid Customer.

I really don't have a lot of experience with LDAP (pretty much none at all), so even just a good LDAP and Active Directory tutorial would be extremely useful (even that is eluding me right now). Thanks!

I've since lookup up the actual distinguished name in ADSI Edit, which was LDAP://XXXX.YYY/CN=Users,DC=XXXX,DC=YYY, but still have no luck.

Upvotes: 10

Views: 112816

Answers (3)

Ali Rasouli
Ali Rasouli

Reputation: 1905

if your domain is xxxx.yyyy.zzzz and you are search for all users; your path is:
LDAP://CN=Users,DC=xxxx,DC=yyyy,DC=zzzz
means every dot in domain replace with dc=

Upvotes: 4

Laky
Laky

Reputation: 193

You have error in your LDAP string. Let's have examle: user with account name User1 in organization unit Office1 where contoso.com is domain.

Object:

contoso.com/Users/Office1/User1

LDAP Path is:

LDAP://CN=User1,OU=Office1,OU=Users,DC=contoso,DC=com

Note that there is no slash in path itself

  • CN = Common Name
  • OU = Organizational Unit
  • DC = Domain Component

Upvotes: 12

geoffc
geoffc

Reputation: 4100

More directly, the default Users container (not a group) in a default Active Directory install would be CN=Users,dc=domain,dc=com

You are not clear if you are having trouble adding a user to a group, or if you are having trouble creating a user in a specific location.

Upvotes: 1

Related Questions