Is there a way to invite a user to a tenant through code?

Trying to check on Auth0 management API but can’t find a way to automate the process of inviting user to a tenant. Anyone know how?

Hey @coderbn !

Unfortunately it’s not doable via our Management API. Two things you can achieve using our API in terms of tenants is either getting or updating tenant settings: Auth0 Management API v2

If you want to invite someone to tenant, you need to do it via our dashboard: https://manage.auth0.com/#/tenant/admins

may be like this : Send Email Invitations for Application Signup

you can create user (Auth0 Management API v2),
then ask for change password link (https://auth0.com/docs/api/management/v2/#!/Tickets/post_password_change),
then ask for validation ticket (Auth0 Management API v2) with change password link as callback,
then send an email to the user with this link

I think that what @coderbn wanted was a single API call right? Cause there is a solution for that as you mentioned @sl1 but it requires a little bit of hustle and it’s not that straightforward.

Yes wanted to use a single call if possible.
Thanks @konrad.sopala and @sl1 will try your suggestions if that cater my needs.

1 Like

Sure! Let us know if that worked for you!