# Auto-remove accounts when SSO ID is not longer valid

**URL:** https://meta.discourse.org/t/auto-remove-accounts-when-sso-id-is-not-longer-valid/130697
**Category:** SSO
**Created:** [October 10, 2019, 3:24pm UTC](https://meta.discourse.org/t/auto-remove-accounts-when-sso-id-is-not-longer-valid/130697 "2019-10-10T15:24:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rlaliberty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rlaliberty/32/96258_2.png) [@rlaliberty](https://meta.discourse.org/u/rlaliberty)
#### Post date: [October 10, 2019, 3:24pm UTC](https://meta.discourse.org/t/auto-remove-accounts-when-sso-id-is-not-longer-valid/130697/1 "2019-10-10T15:24:31Z")

</div>

Our community relies on a user owning our software product in order to start posting on the site. When their account is deleted internally (say, they return the product or factory reset), we’d like to also nuke the Discourse account (without removing their posts). Is there a way to do that?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [October 10, 2019, 3:33pm UTC](https://meta.discourse.org/t/auto-remove-accounts-when-sso-id-is-not-longer-valid/130697/2 "2019-10-10T15:33:31Z")

</div>

I recommend calling the API during user internal deletion and putting the user in the Suspended state.

> [@Understanding user statuses, roles, and permissions](https://meta.discourse.org/t/description-of-various-user-states-in-discourse/35171):
>
> bookmark This is a guide for understanding the various user statuses, roles, and permissions within Discourse, including how they affect user capabilities and how they are stored in the database. person_raising_hand Required user level: Administrator Discourse has many built-in user statuses, roles, and permissions. These statuses and roles can be seen for a given user when viewing their profile from the users’ section of the admin dashboard: Permi…
