3 Replies Latest reply on Aug 23, 2016 8:40 AM by Jamie Cannon

    Query Active Directory to fetch approver name based on company code

    HimaniTanwar Apprentice

      We need to define a process in which if a user selects any service in service catalog then approval should be taken in order to process the request. For approval to happen, we need to query Active directory which contains user name, email and company code. We need to query on the basis of company code in order to get approver name. Once we get an approver name, we need to get approval and on the basis of 1st approval we need to again do a lookup in Active directory to find the second approver.

       

      Can someone guide as to how would this be achieved or if this cannot be achieved.

        • 1. Re: Query Active Directory to fetch approver name based on company code
          Jamie Cannon ITSMMVPGroup

          Are you importing data from Active Directory like your users?

           

          Also, do you have a reference list defined in Service Desk that holds your company codes?

           

          What I would say do is create a reference list under system called "Company Codes" that has a couple User fields - Primary Approver and Secondary Approver.

           

          Then create a relationship from Company Code to Users and add that to the End User and Analyst form.  Associate a company code with all your users in the system (granted you import them from AD).

           

          Then, in your process, if approval is required, have it assign to your RaiseUser.CompanyCode.PrimaryApprover and have it go to an awaiting status.  Then create a query that looks at the creation of the ticket and the status and if it's in an Awaiting approval and it's been created for more than X days.  Set that query up in the schedule manager and have a scheduled task that runs that query every hour and if there is anything in there have it trigger an action in the process for "Reassign to Secondary Approver".  In your process you need to have a windowless action for this and an auto assign after that action that assigns to RaiseUser.CompanyCode.SecondaryApprover.

           

          Hope this points you in the right direction.

          Jamie

          • 2. Re: Query Active Directory to fetch approver name based on company code
            HimaniTanwar Apprentice

            Hi Jamie,

             

            Is there any document/article regarding how to set up a reference list in Landesk?

             

            In our process there is a list of approvers already defined in the Active Directory against each Company Code. For Example: There can be 3 different approvers against company code 'Code1' and 2 approvers against company code 'Code2'. If a user having company code 'Code1' is selected then depending upon the apporval hiererchy the ticket must be send to all the 3 approvers sequentially. If Approver1 approves the ticket then it must be send to Approver2 for his apporval and so on.