API to delete an User

I am looking 2 APIs

1) API to delete an User from OutSystem User management, irrespective he has role or not.

2) API to delete an user from Outsystems lifetime

I tried looking here  : https://success.outsystems.com/Documentation/11/Reference/OutSystems_APIs/Users_API, User_DeleteIfNoRoles API does not meet my requirement.

Hi Rajkiran,

I found this article link that may helps you.


Hi Rajkiran,

I'm assuming that you're looking to trigger these actions outside of your OutSystems environment hence asking for an API (Otherwise the suggestion below will still be applicable just without exposing that functionality in a custom API) .

For your first point, there are a couple options:

  1. Inactivating the user instead of deleting them (by using the User_Update method and passing in False in the Is_Active field) - Inactive users are excluded from User license limits. 
  2. OutSystems allows you to create & expose your own custom API. This means that you can create a custom API which deletes all roles from a user (by filtering the User_Role Entity in the System module by the UserId and deleting those records) first and then call the User_DeleteIfNoRoles action in the same flow. Given the sensitivity of data at hand, ensure that you have configured your API Authentication adequately - see more here.

For your second point, Lifetime's v2 API has a user endpoint however the deletion of users is not within the scope of its actions. 

One last thing to note is that if OutSystems doesn't expose the exact functionality you're looking for ootb than there might be a good reason for it. I'd recommend researching OutSystem's suggestions and security best practices on the matter before delving into solution mode :)




Hi Rajkiran, 

In addtion to Ossama's reply. Instead of User_Role Entity you should refer to User_Effective_Role Entity, Because it's include the roles thease are inherit from Groups. 

For question #2, Is "User from Outsystems lifetime" means IT user? It's very different to end user, as Ossama said,

You should consider the security best practices. Is it really need to delete IT user progmactlly?


Yes, whenever user is decommissioned from our Company AD Group or employee leaves the organization, I want to delete that use from LifeTime via from automated job.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.