Solved

LDAP manager Attribute - trying to write it

Posted on 2012-03-29
5
556 Views
Last Modified: 2012-03-29
Does anyone have an example of how to write the manger LDAP attribute - I can not get it to work it keeps telling me constraint error
0
Comment
Question by:r3nder
  • 3
  • 2
5 Comments
 
LVL 27

Expert Comment

by:KenMcF
ID: 37783615
Can you post the code you are using?

The manager attribute needs a Distinguished name, is that what you are using?
0
 
LVL 6

Author Comment

by:r3nder
ID: 37783790
I am getting the supervisor name (ex John Doe) and concatinating everything to see if it works

sManager = drUpdateOptions.Item("supervisor_nm").ToString.Trim
'''''''''''''''''''''''''''''''''''''
 If sSupervisorUserID.Trim.Length > 0 Then
                    Dim sDistinguishedName As String = String.Empty
                    If IsValidADLogin(sSupervisorUserID, "", "", "") Then

                        sDistinguishedName = getSupervisorDN(sSupervisorUserID, asProcessingDate, asDomain)
                    End If
                    Dim newManager As String = "CN=" & sManager & ",OU=Dallas (GREP SOMEWHERE),OU=OU,DC=COMPANY,DC=com"
                    'sNotFoundInitial = SetADProperty(dirEntryResults, "manager", sDistinguishedName) 
                    sNotFoundInitial = SetADProperty(dirEntryResults, "manager", newManager)                 End If

Open in new window

0
 
LVL 6

Author Comment

by:r3nder
ID: 37784399
I have the mangers login (example jdoe0123) and I have the display name (example John Doe) can you give me a way to use either of those 2 to write an if statement to get the distinct name from that?
0
 
LVL 27

Accepted Solution

by:
KenMcF earned 500 total points
ID: 37784429
take a look at this link, it is getting a DN for a group but you can change to get it for a user object


http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_26293016.html
0
 
LVL 6

Author Closing Comment

by:r3nder
ID: 37785009
Worked like a champ! Thanks KenMcF
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question