Quantcast
Channel: Forum Microsoft Identity Manager
Viewing all articles
Browse latest Browse all 6944

Retrieve Manager DN using the Manager's EmployeeID and Export to CS

$
0
0

My scenario is almost identical to the sample scenario in this blog that I have been trying to follow.  Customer has multiple domains.  A user's manager may likely exist in another domain in a different forest.  So, they use the UserProxy objects in LDS to track the managers.  All users in MIM are exported to a single LDS datasource.  I have the managerID attribute populated on all users with their manager's employee ID.  I need a way to export the reference to the manager attribute to the LDS Connector Space.  Here is my adapted code from the above blog.  Where am I going wrong?  The Sync Engine is telling me that ManagerID doesn't exist.  I have ManagerID (string) mapped to manager (reference) and set as a Rules Extension.  Then, I put the below code in the Export section of the code.

string ManagerIDField;
            ManagerIDField = "" + csentry["ManagerID"].ReferenceValue;
            string employeeIDField;
            employeeIDField = "" + csentry["employeeID"].ReferenceValue;
            //Start manager lookup
            if (mventry[ManagerIDField].IsPresent)
            {
                MVEntry[] mveManager;
                mveManager = Utils.FindMVEntries(employeeIDField, mventry[ManagerIDField].Value);

                //performs a search
                if (mveManager.Length == 1)//if we get only one return (which we should)
                {
                    if (mveManager[0]["DN"].IsPresent)//if there is the DN on that return
                    {
                        csentry["manager"].Value = mveManager[0]["DN"].Value; //set the DN as the manager
                        //break;
                    }
                    else
                    {
                        //break;//dn may not be populated yet - it will occur on the next run
                    }
                }
                else
                {
                    //break;

                    //should never happen (employeeID is unique)- we'll fall through if it does
                }
            }
            else
            {
                //break;

 

Mike Leach | http://blogs.catapultsystems.com/mleach/default.aspx



Viewing all articles
Browse latest Browse all 6944

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>