Mapping users to their managers

Version 1

    Problem:

    In Service Desk the correct configuration would be to have a manager setup as a related attribute back to the user object.  This way their manager is a user from the list of users in Service Desk.

     

    The problem with this is that if you try mapping to a related object during a data import the field must match exactly.  If it doesn't then the record will be skipped.  What this means is that if the field coming in AD does not exactly match the managers name in Service Desk (the Title attribute) then it will skip that user and not import/update them.  So generally it is a good idea to avoid mapping to related attributes in a data import.

     

    Solution:

    This solution brings the users DN (ie CN=Nephi Wolf/OU=LANDesk/OU=COM) and the managers DN and then uses a database script to set the manager.  This method is preferred to mapping the manager to the relationship during data import because if the manager doesn't match up then the user data will still have been imported/updated from AD, it just won't have their manager.

    To implement this solution do the following:

    1.  In Object Designer create two string attributes on the System.User object with a size of 1000.  The first one should be called aduserdn and the second one should be called admanagerdn.  The first one will be for the users DN, the second for the managers DN.

    2.  In Object Designer create a relationship from the System.User object back to itself.  Call this relationship Manager.  This way the manager will be a user from Service Desk.

    3.  Run the attached script nightly after the user imports finish.  This way it will create/update the managers from the data import.