Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

LDAP manager Attribute - trying to write it

Posted on 2012-03-29
5
Medium Priority
?
572 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 2000 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
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 …
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 …
Suggested Courses

636 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