User import job polling or webhook

Hi,
I use the user import job to add users. After the job is done, I want to add those users to an organization and add organization roles with the Management Api. This can only be done if the job has been completed. How can I best check if this is the case? Should I poll the “jobs” endpoint, or are there other ways like webhooks? I don’t think I can use Event streams, because if I get a user.created event I don’t know anything about the org or roles.

Hi!

You could use: “send_completion_email”: true if you wanted a simple notification but the official way to check is to query the endpoint: Bulk User Imports - Auth0 Docs . If you use the extension you can get a visual status too User Import / Export Extension - Auth0 Docs

2 Likes

Hi @Montijn

Thank you for reaching out to us!

The recommendation and provided documentations from @JFoxUK would be the correct way to configure the flow, please let us know if it’s working for you and do not hesitate to reach out to us for any other issues or requests.

Best regards,
Gerald

1 Like