ADMP Integration - Add/Remove users from Groups

ADMP Integration - Add/Remove users from Groups

Use Case:
Adding or removing a user from a group is a common but repetitive task that requires manual effort from the IT team. This process can be automated using the built-in capabilities of ServiceDesk Plus.

By leveraging the Dynamic Request Engine (DRE) in ServiceDesk Plus, we can trigger a Deluge script that adds or removes users from Active Directory (AD) groups through the ADManager Plus API.

Steps to set it up:

1.  Download the attached scripts.  

2. To connect ServiceDesk Plus with ADManager Plus, make sure you have the ADManager Plus URL, Auth Token, and Domain Name. These are required prerequisites.
Use a global function to store this configuration securely so it can be accessed by multiple custom functions.
   To create a global function:
   - Navigate to Admin > Request Custom Function > Global Functions > New
   - Set the return type to Map
   - Insert the contents of the file named ADMP_Configuration.txt
   - Save the function with a suitable name




3.  Go to Admin > Developer Space > Custom Function > Callback Functions and paste the contents of ADMPGroups_CallBackfunction.txt. Save it with an appropriate name.


4. Go to Admin > Incident Template / Service Catalog > Edit Required Template > Field and Form Rules > On Form Load.
   Create a new rule, paste the contents of PopulateLoginNamesIntoAdditionalField.txt, and save it with a descriptive name.
   In the rule configuration, select Execute Script and apply it to Technicians.


5: Go to Admin > Incident Template / Service Catalog > Edit Required Template > Field and Form Rules > On Form Load.
   Create another new rule, paste the contents of PopulateADMPGroups.txt, and save it with a suitable name.
   In the rule configuration, select Execute Script and apply it to Technicians.

6.  Update the callback URL and field names according to your environment in both scripts used in Steps 4 and 5.

7.  The actual functional logic for the automation should be defined under Admin > Request Custom Function > Custom Action.
   Update the LDAP field values and SDP additional field API field names in the script so the LDAPFields and SDPFields are mapped correctly.

8. With custom triggers, configure conditions such as “when a request is created” or “when a request is approved” to invoke the Deluge script stored in the custom function. This allows the system to automatically add or remove the user from the relevant AD group.

For Adding to a Group:





For Removing from a Group:



Summary:
This automation eliminates the need for manual group management, reduces operational effort, and ensures that user group membership in AD is updated consistently based on ServiceDesk Plus request actions.


                    New to ADSelfService Plus?

                      • Related Articles

                      • ADMP Integration - Delete an User

                        Use Case:  While resigning an employee, the HR department sends the employee’s details to the IT department via email. IT department in turn, will delete the employee from the Active Directory.  This process entails redundant work, its time ...
                      • ADMP Integration - Unlock an User

                        Use Case:  Automatically unlock user accounts in ADManager Plus when a ticket is raised in ServiceDesk Plus for the same.  All you have to do is, invoke a Deluge script to unlock the user using ADManager Plus API. Steps to set it up: 1. To connect ...
                      • ADMP Integration - Modify User Attributes (Department, Manager)

                        Use Case:  Modifying User Attributes for a user account in AD can be automated with ServiceDesk Plus’ in-product capabilities. Making use of the DRE in ServiceDesk Plus, we can invoke a Deluge script which will unlock the user account in AD using ...
                      • ADMP Integration - Password Reset for a user account

                        Use Case:  Frequent calls to the help desk to reset their account password, are quite common. This process entails redundant work, its time consuming. This can be automated with ServiceDesk Plus’ in-product capabilities. Making use of the DRE in ...
                      • ADMP Integration - Auto create User Accounts in AD

                        Use Case:   In many organizations, the employee onboarding process requires the Hiring Manager to send the employee details to the IT team, who will add the employee to the organization's Active Directory. This time-consuming, human error-prone ...