Activate User  

Table of Contents

Overview

The zoho.directory.activateUser task is used to activate a user using their ID in the specified organization.

Note: Activating a user will regain access to their account and to all the associated applications.

Syntax

<response> = zoho.directory.activateUser(<orgID>, <userID>, <connection>);

Scope

ZohoDirectory.Users.UPDATE         

where:

ParameterDescriptionData type
responseis the variable that will hold the details of the activated user.KEY-VALUE
<orgID>is the ID of the organization in which the user needs to be activated.NUMBER
<userID>is the ID of the user who needs to be activated.NUMBER
<connection>is the name of the Zoho Directory connection.TEXT

Example

The following script activates a user with ID - 1510XXXXXXXX in Zoho Directory organization with ID - 72XXXXXXX :

response = zoho.directory.activateUser(72XXXXXXX, 1510XXXXXXXX, "zoho_directory_connection");

where:

response
This is the KEY-VALUEresponse returned by Zoho Directory.
72XXXXXXX
This is the NUMBERthat represents the organization ID of Zoho Directory account.
1510XXXXXXXX
This is the NUMBERthat represents the user ID of a user who needs to be activated.
zoho_directory_connection
This is the TEXTthat represents the link name of the connection.

Response Format

{
   "status_code": 200,
   "activate": [
       {
           "href": "http://directory.zoho.com/api/v1/orgs/72*******/users/1510********/activate"
       }
   ],
   "resource_name": "activate",
   "message": "User has been activated successfully!"
}