Okta Admin Management API
/Users
//
Deactivate a user
CORS
OAuth 2.0 scope:
- okta.users.manage
Deactivates a user.
Perform this operation only on users that do not have a DEPROVISIONED status.
- The user's
transitioningToStatusproperty isDEPROVISIONEDduring deactivation to indicate that the user hasn't completed the asynchronous operation. - The user's status is
DEPROVISIONEDwhen the deactivation process is complete.
Important: Deactivating a user is a destructive operation. The user is deprovisioned from all assigned apps, which might destroy their data such as email or files. This action cannot be recovered!
You can also perform user deactivation asynchronously. To invoke asynchronous user deactivation, pass an HTTP header Prefer: respond-async with the request.
Note: Users with the
DEPROVISIONEDstatus won't have their profiles updated when running the Update a user endpoint unless you have the Edit Deactived User Profile Updates option turned on in the Admin Console. See Edit deactivated user profiles.
- https://subdomain.okta.comhttps://subdomain.okta.com/api/v1/users/{id}/lifecycle/deactivate
curl -i -X POST \
'https://subdomain.okta.com/api/v1/users/{id}/lifecycle/deactivate?sendEmail=false' \
-H 'Prefer: respond-async'