When requesting getUsers, the values for the "Inactive" and "Employment Ended" statuses are the same — 3. To differentiate between these statuses, use the getUsers/v2 request. In this way, in the status parameter, inactive users will be indicated by status 3, while users who are identified as "Employment Ended" will be indicated by status 5. |
Account Owner, Account Administrators, Department Administrators, or custom roles.
Department Administrators and users with a custom role can get lists of the users belonging to the departments they manage and their sub-departments.
| Parameter | Type | Description |
|---|---|---|
| token (required) | string | Access token. You can obtain a token by making a request |
| groupId (optional) | string | If specified, this method selects users belonging to a specific group |
| departmentId (optional) | int | If specified, this method selects users belonging to a specific department |
Return Value
After the request has been completed, the system returns an object with the following properties:
| Parameter | Type | Description |
|---|---|---|
| users | UserProfile[] | An array of user profiles. The UserProfile object has the same properties as the getUserProfile method |
| workLeaveStatus (optional) | string | A work leave status. An array with the following parameters:
|
Possible Errors
| Error | Description |
|---|---|
| Permission denied | The user doesn't have enough permissions to handle the request For example, Department Administrator can't get a list of users from a department they don't manage |
Sample Call
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/"
xmlns="https://ispringlearn.com/go/services/api/soap">
<SOAP-ENV:Body>
<GetUsersRequest>
<credentials>
<token>p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE</token>
</credentials>
</GetUsersRequest>
<groupId>string</groupId>
<departmentId>string</departmentId>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> |
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/"
xmlns="https://ispringlearn.com/go/services/api/soap">
<SOAP-ENV:Body>
<GetUsersResult>
<userProfile>
<userId>43eb7146-6280-11e9-b274-a6210366ac32</userId>
<role>learner</role>
<departmentId>e95b4ad0-5f50-11e9-80c4-0a580af406eb</departmentId>
<status>1</status>
<fields>
<field>
<name>LOGIN</name>
<value>helen@ispring.com</value>
</field>
<field>
<name>EMAIL</name>
<value>helen@ispring.com</value>
</field>
<field>
<name>FIRST_NAME</name>
<value>Helen</value>
</field>
<field>
<name>LAST_NAME</name>
<value>Jones</value>
</field>
<field>
<name>JOB_TITLE</name>
<value>Accountant</value>
</field>
<field>
<name>COUNTRY</name>
<value>643</value>
</field>
</fields>
<groups>
<id>e0b394fc-44b9-11e9-92c8-0a580af401f6</id>
</groups>
<manageableDepartmentIds>
<id>3fa85f64-5717-4562-b3fc-2c963f66afa6</id>
</manageableDepartmentIds>
<userRoles>
<userRole>
<roleId>eaf01e14-2ae1-11e9-89a5-0242ac13000a</roleId>
<roleType>learner</roleType>
<manageableDepartmentIds>
<id>f9de0c52-6f59-11ea-b88f-cee299842653</id>
<id>f9d9f306-6f59-11ea-ad9a-cee299842653</id>
</manageableDepartmentIds>
</userRole>
</userRoles>
<addedDate>2019-04-30</addedDate>
<lastLoginDate>2019-04-30</lastLoginDate>
</userProfile>
<userProfile>
<userId>43eb7146-6280-11e9-b274-a6210366ac33</userId>
<role>department_administrator</role>
<departmentId>e95b4ad0-5f50-11e9-80c4-0a580af406eb</departmentId>
<status>1</status>
<fields>
<field>
<name>LOGIN</name>
<value>kevin@ispring.com</value>
</field>
<field>
<name>EMAIL</name>
<value>kevin@ispring.com</value>
</field>
<field>
<name>FIRST_NAME</name>
<value>Kevin</value>
</field>
<field>
<name>LAST_NAME</name>
<value>Klein</value>
</field>
<field>
<name>JOB_TITLE</name>
<value>Sales Manager</value>
</field>
<field>
<name>COUNTRY</name>
<value>643</value>
</field>
</fields>
<groups>
<id>e0b394fc-44b9-11e9-92c8-0a580af401f6</id>
</groups>
<manageableDepartmentIds>
<id>3fa85f64-5717-4562-b3fc-2c963f66afa6</id>
</manageableDepartmentIds>
<userRoles>
<userRole>
<roleId>eaf01e14-2ae1-11e9-89a5-0242ac13111b</roleId>
<roleType>department_administrator</roleType>
<manageableDepartmentIds>
<id>f9de0c52-6f59-11ea-b88f-cee299842653</id>
<id>f9d9f306-6f59-11ea-ad9a-cee299842653</id>
</manageableDepartmentIds>
</userRole>
</userRoles>
<addedDate>2019-04-29</addedDate>
<lastLoginDate>2019-04-30</lastLoginDate>
</userProfile>
</GetUsersResult>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> |