# Automate user delete

**URL:** <https://community.auth0.com/t/automate-user-delete/108694>\
**Category:** Get Help\
**Tags:** user-import-export, user-management\
**Created:** [June 6, 2023, 7:40pm UTC](https://community.auth0.com/t/automate-user-delete/108694 "2023-06-06T19:40:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkim](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@dkim](https://community.auth0.com/u/dkim)\
**Post date:** [June 6, 2023, 7:40pm UTC](https://community.auth0.com/t/automate-user-delete/108694/1 "2023-06-06T19:40:47Z")

</div>

Is creating an API the only way to delete the users in Auth0 that are not present in Windows AD manager? When there is a new user in AD, the new user seems to be created in Auth0, but if the user is deleted from AD, it is still present in Auth0. What is the best way to sync the active users?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [June 30, 2023, 7:00pm UTC](https://community.auth0.com/t/automate-user-delete/108694/3 "2023-06-30T19:00:59Z")

</div>

Hi @dkim,

Thanks for reaching out to the Auth0 Community!

> [@dkim](#):
>
> What is the best way to sync the active users?

Unfortunately, when you delete a user from your AD instance, the user’s Auth0 profile will not be automatically deleted. However, since the user is deleted in your AD instance, they won’t be able to authenticate anymore, even though their profile still exists in Auth0.

If you wish to delete the user’s Auth0 profile as well, you will need to use the [Management API to delete the user](https://auth0.com/docs/api/management/v2#!/Users/delete_users_by_id) programmatically.

Please let us know if you have any additional questions.

Thanks,  
Rueben

---

<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:** [July 14, 2023, 7:01pm UTC](https://community.auth0.com/t/automate-user-delete/108694/4 "2023-07-14T19:01:58Z")

</div>

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