Add user on SCIM import

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?

Hi @femilshajin,

Our Post-user Registration Trigger 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.

According to our ManagementClient | auth0 reference, you would need to call the management.organizations.addMembers() and management.roles.assignUsers() methods.

Thanks,
Rueben

1 Like

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.