Today I am working on Runbooks for Configuration Manager 2012.
Part of this runbook has to find a user in the active directory, and afterwards find his manager’s email address, before sending an email to the manager.
So I start by search for the user in the “Get User ” Activity.
I get the result, and have the “manager” field as Distinguished Name format.
I setup the “Get manager” (Get user activity), and need to set the filters to search for this DN.
Problem is that it is not possible to select DistinguishedName as filter!!
What to do………….. First of I spend some time complaining, but when I was done crying I figured something out! 😉
by reading the manual at http://technet.microsoft.com/en-us/library/hh553476.aspx
you will see that it is possible to set different properties for the search.
These properties include
Element |
Description |
Valid Values |
ReturnDNOnly |
If true, only the Distinguished Name property will be returned instead of all properties |
Boolean |
Search Root |
The distinguished name of the node in the Active Directory Domain Services hierarchy where the search starts |
String |
Search Scope |
The scope of the search that is observed by the server. The options are Base, OneLevel or SubTree. |
String |
Oh! We can use the “Search root” to select where we want to start our search! This means I can map the manager DN to this property and define no filters, and our result will be the user!
I did also define the “Search scope” as base. This means I will not search in any sub objects of the root object. (since a user is not a container, it is not possible to have any subs, but I seemed to perform faster anyway.
So there you have it! How to search for DN by using “Get User”
[…] System Center Orchestrator 2012: Active Directory IP – Get User Activity – How to search… […]
This was a good tip – I am creating a runbook to notify the Assigned To User’s manager if the SLA goes to Warning or Breach. Testing it now. Thanks!
Nice guide but for some reason I had to prefix the Search Root with LDAP:// or else I got an error when looking up the manager through the DN.
The result is then Search Root: LDAP://{Manager from ‘Get User’}
/Martin
hello martin
weird. never had to do that myself.
are you sure you are not using the AD IP from codeplex? 🙂
[…] System Center Orchestrator 2012: Active Directory IP – Get User Activity – How to search for Dis… […]
Hi Jakob,
Really good article. Can you please let me know how that can search based on existing windows logon name. I have a AD env. which sets windows logon based on first letter of first and last name and we want to get it done automated using get user activity.