# Manual User Creation Does Not Trigger Rule

**URL:** <https://community.auth0.com/t/manual-user-creation-does-not-trigger-rule/66046>\
**Category:** Get Help\
**Created:** [July 13, 2021, 2:02am UTC](https://community.auth0.com/t/manual-user-creation-does-not-trigger-rule/66046 "2021-07-13T02:02:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfletcher](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jfletcher/32/30511_2.png) [@jfletcher](https://community.auth0.com/u/jfletcher)\
**Post date:** [July 13, 2021, 2:02am UTC](https://community.auth0.com/t/manual-user-creation-does-not-trigger-rule/66046/1 "2021-07-13T02:02:40Z")

</div>

Hello, I am currently using Auth0 for authorization for my react app where I am also using Hasura. I have created this rule that is suppose to insert an auth0 user into a table within my Hasura.

```auto
function syncUserToHasura (user, context, callback) {
  const query = `
    mutation($userId: String!, $email: String, $name: String, $avatar: String) {
      insert_organizations(
        objects: [{
            auth0_id: $userId
            email: $email
	    name: $name
	    profile_picture: $avatar
        }],
        on_conflict: {
            constraint: organizations_auth0_id_key,
            update_columns: [updated_at]
        }) {
            affected_rows
      }
    }
  `;

  const variables = {
    userId: user.user_id,
    email: user.email,
    name: user.name,
    avatar: user.picture,
  };

  const payload = {
    headers: {
      "content-type": "application/json",
      "x-hasura-admin-secret": configuration.ACCESS_KEY
    },
    url: `Redacted`,
    body: JSON.stringify({ query, variables }),
  };

  request.post(payload, (error, response, body) => callback(error, user, context));
}

```

When I manually create a user from my Auth0 dashboard, this rule seems to not get triggered. It is only until the user tries to login does it seem to trigger as a new row is added into my table. I am new to this so it is very possible I overlooked something; however, I was wondering if this is possible. If so, what am I missing?

---

<div class="post-metadata">

**Author:** ![sidharth.chaudhary](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sidharth.chaudhary/32/20686_2.png) [@sidharth.chaudhary](https://community.auth0.com/u/sidharth.chaudhary)\
**Post date:** [July 13, 2021, 3:19am UTC](https://community.auth0.com/t/manual-user-creation-does-not-trigger-rule/66046/2 "2021-07-13T03:19:49Z")

</div>

Hello @jfletcher , Welcome to the Auth0 Community!

Manually creating a user via Dashboard will not trigger rules.  
Rules are part of the login flow only and do not trigger for Management API and Dashboard operations.

More information here:

> **[Rules Execution Best Practices](https://auth0.com/docs/customize/rules/rules-best-practices/rules-execution-best-practices)**
>
> Learn about best practices for executing Auth0 rules.

Please let me know if this helps.

Regards,  
Sid

---

<div class="post-metadata">

**Author:** ![jfletcher](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jfletcher/32/30511_2.png) [@jfletcher](https://community.auth0.com/u/jfletcher)\
**Post date:** [July 13, 2021, 3:30am UTC](https://community.auth0.com/t/manual-user-creation-does-not-trigger-rule/66046/3 "2021-07-13T03:30:47Z")

</div>

Thanks for the quick response! I am unsure how I missed that, thank you!

---

<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:** [July 13, 2021, 9:21am UTC](https://community.auth0.com/t/manual-user-creation-does-not-trigger-rule/66046/4 "2021-07-13T09:21:23Z")

</div>

No worries! We’re here for you!

---

<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 28, 2021, 9:22am UTC](https://community.auth0.com/t/manual-user-creation-does-not-trigger-rule/66046/5 "2021-07-28T09:22:21Z")

</div>

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