Question

Removing users via API

  • 2 September 2021
  • 1 reply
  • 58 views

I see two APIs; one for Delete and the other to change Status. Delete seems to fail, it triggers an oauth token refresh for some reason so before I shift to trying to set status to 0… is that a thing? What’s it for vs. deleting the user?

 

Some very basic provisioning questions there. Other APIs seem to be fine btw, just delete seems problematic. Also side note, it looks like you cannot use the API test tool if you have SSO configured, the authorization prompt demands a username and password.


1 reply

Hi Webb, 

 

The API endpoint /manage/v1/user/delete can be used to actually delete an user. After deletion the user would not be in the system anymore.  You can use a request body similar to the following: 

 {
  "user_names": [
    "Valentina.Pat"
  ]
}

 

The API endpoint /manage/v1/user/change_status can be used to activate or deactivate an user.  For example, if you have a user with id 13245 which is active and you wish to deactivate it, you can use the following request body: 

{"user_ids":["13245"],"status":0}

The user will still be in the system but with a different status.  Please use 

"status":0

for deactivating the user and 

"status":1 

for activating the user. 

 

Regarding the authorization prompt for using the Docebo API explorer 

https://<yourplatform>.docebosaas.com/api-browser/

As a superadmin you could create a user in the system dedicated to API calls and create a username and a password for it. Such a user would not be present in your IdP (Identity Provider), thus would not be impacted by SSO. 

 

Best regards, 

 

Irasema

Reply