Deleting users

You can delete an individual user or remove an LDAP group from the list of users.

If you delete an LDAP server, the LDAP group will be automatically removed from the list of users. For details, follow the instructions in Unregistering an LDAP server.

Method and URI

To delete a user with a {userId}, the request’s method and URI are similar to the following example:

DELETE  https://{hostname|IPv4}/api/security/user/{userId}

Tip

To get a {userId} value based on the user name, follow the instructions in Getting a {userId}.

Parameters

None.

Data

None.

Example

Assume that you want to delete user Sarah ({userId} 1005). Run the following command:

user_id = "1005"

requests.delete('https://' + spp_ipv4 + '/api/security/user/' + user_id,
    headers={...}, params="", data="", verify=...)

After you run the Python snippet, ensure that you get a response with the HTTP status of 204 (No Content) and that you no longer see the user Sarah.

To delete an LDAP group, send a similar request with the {userId} of the LDAP group.