# Regulating and verifying users before granting them access

**URL:** <https://community.auth0.com/t/regulating-and-verifying-users-before-granting-them-access/126884>\
**Category:** Get Help\
**Tags:** user-invitation, user-management\
**Created:** [February 8, 2024, 7:17pm UTC](https://community.auth0.com/t/regulating-and-verifying-users-before-granting-them-access/126884 "2024-02-08T19:17:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![isaacT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/isaact/32/54671_2.png) [@isaacT](https://community.auth0.com/u/isaacT)\
**Post date:** [February 8, 2024, 7:17pm UTC](https://community.auth0.com/t/regulating-and-verifying-users-before-granting-them-access/126884/1 "2024-02-08T19:17:18Z")

</div>

I am new to Auth0 and was curious how I (or another admin) can verify and approve users before they have access to the site? Currently a user just has to create a username/password and then they have instant access to the site. I want to only allow members of the organization into certain parts of the site. I have searched around the docs and cannot find any information on how to do this?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [February 9, 2024, 1:43am UTC](https://community.auth0.com/t/regulating-and-verifying-users-before-granting-them-access/126884/3 "2024-02-09T01:43:26Z")

</div>

Hey there @isaacT welcome to the community!

You have a couple options here:

- Look into relying only on [sending email invitations](https://auth0.com/docs/customize/email/send-email-invitations-for-application-signup).

- A more involved flow wherein you add a flag in [user’s metadata](https://auth0.com/docs/manage-users/user-accounts/metadata/manage-user-metadata) at [registration](https://auth0.com/docs/customize/actions/flows-and-triggers/pre-user-registration-flow#set-metadata-in-the-user-profile), and subsequently deny the user in a post login action until the flag has been updated by you or another admin. The action code might look like:

```auto
exports.onExecutePostLogin = async (event, api) => {
  if (event.user.app_metadata && event.user.app_metadata.status === 'pending_approval') {
    api.access.deny('Your account is pending approval.');
  }
};

```

---

<div class="post-metadata">

**Author:** ![isaacT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/isaact/32/54671_2.png) [@isaacT](https://community.auth0.com/u/isaacT)\
**Post date:** [February 15, 2024, 6:55pm UTC](https://community.auth0.com/t/regulating-and-verifying-users-before-granting-them-access/126884/4 "2024-02-15T18:55:51Z")

</div>

Thank you @ty.frith Option one sounds the most promising. This is exactly what I was looking for.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [February 15, 2024, 11:56pm UTC](https://community.auth0.com/t/regulating-and-verifying-users-before-granting-them-access/126884/5 "2024-02-15T23:56:09Z")

</div>

No problem, happy to help!

---

<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 29, 2024, 11:57pm UTC](https://community.auth0.com/t/regulating-and-verifying-users-before-granting-them-access/126884/6 "2024-02-29T23:57:09Z")

</div>

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