Solved

LDAP manager Attribute - trying to write it

Posted on 2012-03-29
5
558 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

730 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