Enable or Disable an User Account in ADMP

Enable or Disable an User Account in ADMP

Use Case:  
Automate the acitvation and deactivation of user accounts in your organization's Active Directory (AD) using a single Deluge script. Each time a request is created using a specific template, you can invoke the Deluge script to enable or disable specifc user accounts in AD using ADManager Plus API.

Steps to set it up:

1. Goto Admin > Request custom function > Global Functions. 

We will need the ADMP hosted url, AuthToken and Domain Name for establishing the connection with ADMP.  Storing these information as a global function will help us re-use these in other scripts as well.  please make use of the below script and configure it as in attached screenshot
url="http://win7-1866:9090/";
AuthToken= "46ffd51c-4bd7-4953-86ed-39a5186a69b8";
domainName="sdp-helpdesk.com";
PRODUCT_NAME="ManageEngine ServiceDesk Plus";

configuration = Map();
configuration.put("url",url);
configuration.put("AuthToken",AuthToken);
configuration.put("domainName",domainName);
configuration.put("PRODUCT_NAME",PRODUCT_NAME);

return configuration;





2. To collect the employee information that needs to be updated in ADManager Plus, create incident additional fields and add them to the required request template. 
You can create and gather API names of incident additional fields under Admin >> Incident Management >> Incident - Additional Field.



3. The functional part of the script has to be defined under Admin > Request custom function > Custom Action. 

Update the LDAP Field values and SDP Additional field API Field Names in the script. Ensure the LDAPFields and SDPFields are mapped correctly.

Eg: sAMAccountName is stored in udf_sline_30





4. Refer attachment for the deluge script. [FileName: Disable_ADMP_User.txt, Enable_ADMP_User.txt]

5. With custom triggers we can configure a criteria such as ‘when a request is created or approved’ to invoke the deluge script stored in the custom function and automatically enables/disables the user account in ADMP.

Enabling the User Account




Disabling the User Account







          • Related Articles

          • Unlock an ADMP 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 ...
          • Delete a User from ADMP

            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 ...
          • Modify User Attributes (Department, Manager) in ADMP

            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 ...
          • Password Reset for a user account in ADMP

            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 ...
          • 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 ...