When attempting to delete a user by using users endpoint with force=true
, the following error message is returned:
Status: 403 Forbidden
{
"type": "error",
"status": 403,
"code": "forbidden",
"help_url": "http://developers.box.com/docs/#errors",
"message": "User cannot be deleted due to retention policies. Please transfer user content first",
"request_id": "o0xqrhhtjjdlp3u9"
}
Root Cause
The above error occurs due the following conditions:
- the user owns contents (file/folder)
- the enterprise has any retention or legal hold policy
This is regardless of whether any of the policies actually apply to the user's content.
Resolution
Transfer the user's content to another user first by using Transfer owned folders API and then try user deletion again.
platform_swarm_kb