Page 1 of 1

Proper API call to remove from company but keep shares

PostPosted: Mon Jul 30, 2018 2:43 pm
by flowdelplaya107
I'm looking for a way to remove a user via the API, but keep the user's shares intact. To be clear: I am not referring to shared folders. I am referring to the shares that the user makes (to other users, teams, etc) in their time at the company.

I can, of course, *partially* do this with "Remove User From Company": https://lastpass.com/enterprise_apidoc.php . From the documentation:

JSON - Delete User (cmd = deluser)
The deluser command is used to delete individual users.

deleteaction
0 - Deactivate user. This blocks logins but retains data and enterprise membership
1 - Remove user. This removed the user from the enterprise but otherwise keeps the account itself active.
2 - Delete user. This will delete the account entirely.


Code: Select All Code
{
    "cid": "8920072",
    "provhash": "<Your API Secret>",
    "cmd": "deluser",
    "data": {
        "username": "user1@lastpass.com",
        "deleteaction": 0
    }
}


But I'd prefer to do this without modifying that person's shares done over the course of their time here.

Any help from someone who's done this would be appreciated.