# Deactivate (or block) users after X number of days

**URL:** <https://community.auth0.com/t/deactivate-or-block-users-after-x-number-of-days/37820>\
**Category:** Get Help\
**Created:** [February 12, 2020, 3:11pm UTC](https://community.auth0.com/t/deactivate-or-block-users-after-x-number-of-days/37820 "2020-02-12T15:11:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zarko](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/zarko/32/19125_2.png) [@zarko](https://community.auth0.com/u/zarko)\
**Post date:** [February 12, 2020, 3:11pm UTC](https://community.auth0.com/t/deactivate-or-block-users-after-x-number-of-days/37820/1 "2020-02-12T15:11:08Z")

</div>

I was trying to find if there was a way to deactivate (or block) accounts after a certain amount of time has passed. For example. Deactivate (or block) the user 10 days after account creation, or after certain inactivity period.

I couldn’t find anything.

Is there an approach we can take to automatically disable/deactivate users?  
Besides writing our own code that would query the API for user creation date and take measures appropriately.

Primarily thinking about users stored in DB hosted by Auth0.

---

<div class="post-metadata">

**Author:** ![markd](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markd/32/38919_2.png) [@markd](https://community.auth0.com/u/markd)\
**Post date:** [February 12, 2020, 3:14pm UTC](https://community.auth0.com/t/deactivate-or-block-users-after-x-number-of-days/37820/2 "2020-02-12T15:14:35Z")

</div>

Hi @zarko,

Welcome to the Community! The only to do this today is by writing your own code. We’re looking at something similar: a script that deletes orphaned user accounts that did not complete our user onboarding process.

Mark

---

<div class="post-metadata">

**Author:** ![zarko](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/zarko/32/19125_2.png) [@zarko](https://community.auth0.com/u/zarko)\
**Post date:** [February 12, 2020, 3:57pm UTC](https://community.auth0.com/t/deactivate-or-block-users-after-x-number-of-days/37820/3 "2020-02-12T15:57:43Z")

</div>

Suspected as much. Thanks in any case @markd

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 12, 2020, 3:59pm UTC](https://community.auth0.com/t/deactivate-or-block-users-after-x-number-of-days/37820/4 "2020-02-12T15:59:44Z")

</div>

@zarko you can always submit that as a feature request for our product team. They should reach out to you within 10 business days. Here’s the form:

> **[Auth0: Secure access for everyone. But not just anyone.](https://auth0.com/feedback)**
>
> Rapidly integrate authentication and authorization for web, mobile, and legacy applications so you can focus on your core business.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 27, 2020, 3:59pm UTC](https://community.auth0.com/t/deactivate-or-block-users-after-x-number-of-days/37820/5 "2020-02-27T15:59:45Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
