Solved

LDAP manager Attribute - trying to write it

Posted on 2012-03-29
5
545 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Worked like a champ! Thanks KenMcF
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Installing a printer using group policy preferences is not that hard let’s take a look at it. First lets open up your group policy console and edit the policy you want to add it to. I recommend creating a new policy for each printer makes it a l…
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
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 configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now