# Add user on SCIM import

**URL:** <https://community.auth0.com/t/add-user-on-scim-import/157136>\
**Category:** Get Help\
**Tags:** users, management-api\
**Created:** [December 4, 2024, 7:35am UTC](https://community.auth0.com/t/add-user-on-scim-import/157136 "2024-12-04T07:35:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![femilshajin](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/femilshajin/32/64811_2.png) [@femilshajin](https://community.auth0.com/u/femilshajin)\
**Post date:** [December 4, 2024, 7:35am UTC](https://community.auth0.com/t/add-user-on-scim-import/157136/1 "2024-12-04T07:35:57Z")

</div>

When a new user is added, the post-user-registration trigger is not triggered. I need to add a user to the org and assign roles when a SCIM user is added. How do I do it?

---

<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:** [December 18, 2024, 6:29am UTC](https://community.auth0.com/t/add-user-on-scim-import/157136/5 "2024-12-18T06:29:12Z")

</div>

Hi @femilshajin,

Our [Post-user Registration Trigger](https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger#post-user-registration) documentation states the following:

> The `post-user-registration` triggers runs after a user has been created for a Database or Passwordless connection. This trigger can be used to notify another system that a user has registered for your application. Multiple actions can be bound to this trigger, and the actions will run in order. However, these actions will be run asynchronously and will not block the user registration process.

This means that the the post-user registration trigger will execute after the user has registered on your application.

If you need to assign roles to a user and add them to an organization, I recommend using the Management API in the Action script. For more information, see our knowledge article at [Using the Management API in Actions](https://community.auth0.com/t/using-the-management-api-in-actions/64947).

According to our [ManagementClient | auth0](https://auth0.github.io/node-auth0/classes/management.ManagementClient.html) reference, you would need to call the `management.organizations.addMembers()` and `management.roles.assignUsers()` methods.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![femilshajin](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/femilshajin/32/64811_2.png) [@femilshajin](https://community.auth0.com/u/femilshajin)\
**Post date:** [December 18, 2024, 6:40am UTC](https://community.auth0.com/t/add-user-on-scim-import/157136/6 "2024-12-18T06:40:10Z")

</div>

Hi @rueben.tiow ,

I understand this is useful when a user is onboarded via a Database or Passwordless connection.

So how do we add users to the org and assign them roles when they are onboarded using SCIM under an enterprise connection? There are no triggers, and we are unable to add custom attributes to find users who are not onboarded.

---

<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:** [January 3, 2025, 7:31pm UTC](https://community.auth0.com/t/add-user-on-scim-import/157136/7 "2025-01-03T19:31:31Z")

</div>

Hi @femilshajin,

Thanks for the reply.

To add users to your organization, you could configure it to **Enable Auto-Membership** , as described in [Grant Just-In-Time Membership to an Organization Connection](https://auth0.com/docs/manage-users/organizations/configure-organizations/grant-just-in-time-membership).  
(Reference: [Configure Inbound SCIM](https://auth0.com/docs/authenticate/protocols/scim/configure-inbound-scim#organizations))

Alternatively, you could directly [Assign Members to an Organization](https://auth0.com/docs/manage-users/organizations/configure-organizations/assign-members).

Then, you can follow our [Assign Members to an Organization](https://auth0.com/docs/manage-users/organizations/configure-organizations/assign-members#management-api) documentation to assign them to roles via the Management API after they have been onboarded.

Let me 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:** [January 17, 2025, 7:32pm UTC](https://community.auth0.com/t/add-user-on-scim-import/157136/8 "2025-01-17T19:32:15Z")

</div>

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