Thomas Pedersen
posted this on Feb 15 23:43
Each user has a type, which determines their administrative privileges.
| User | 0 | No admin privileges |
| Group admin | 1 | Can manage users with their group |
| Admin | 2 | Can manage all users |
A user's status determines their ability to log in. Only active users can access OneLogin.
| Unactivated | 0 |
| Active | 1 |
| Suspended | 2 |
| Locked | 3 |
| Password expired | 4 |
| Awaiting password reset | 5 |
Returns a single user.
<user>
<activated-at>2010-02-13T23:17:52-08:00</activated-at>
<created-at>2010-02-13T23:17:52-08:00</created-at>
<email>hanna@onelogin.com</email>
<firstname>Hanna</firstname>
<group-id nil="true"></group-id>
<id>15568</id>
<invalid-login-attempts>0</invalid-login-attempts>
<invitation-sent-at>2010-02-13T23:17:52-08:00</invitation-sent-at>
<last-login>2010-02-13T23:34:20-08:00</last-login>
<lastname>Banana</lastname>
<locked-until nil="true"></locked-until>
<notes nil="true"></notes>
<openid-name>hanna</openid-name>
<password-changed-at>2010-02-13T23:17:52-08:00</password-changed-at>
<pending-apps nil="true"></pending-apps>
<phone nil="true">310-555-2221</phone>
<roles>
<role>
<id>1</id>
<name>Sales</name>
</role>
<role>
<id>2</id>
<name>Employee</name>
</role>
</roles>
<status>1</status>
<updated-at>2010-02-13T23:34:56-08:00</updated-at>
<user-type>0</user-type>
</user>
Returns all users in one list. The body of each user is the same as for show user.
<users type="array">
<user>
...
</user>
<user>
...
</user>
</users>
Creates a new user. The status of the new user depends on whether a password is provided. If the request contains a password, the status will be Active (1), otherwise it will be Unactivated (0).
<user>
<email>hanna@onelogin.com</email>
<firstname>Hanna</firstname>
<group-id nil="true"></group-id>
<id>15568</id>
<lastname>Banana</lastname>
<notes nil="true"></notes>
<openid-name>hanna</openid-name>
<pending-apps nil="true"></pending-apps>
<phone>310-555-2221</phone>
<updated-at>2010-02-13T23:34:56-08:00</updated-at>
<user-type>0</user-type>
</user>
Updates a user. Note that it is not possible to update a user's password via the API.
<user>
<firstname>Hannah</firstname>
<roles type='Array'>
<role>1</role>
<role>2</role>
</roles>
</user>
This example sets the user's first name to Hannah.
Deletes a user.
Status: 200