# Sending Invitation Emails (follow up to a previous question I found)

**URL:** <https://community.auth0.com/t/sending-invitation-emails-follow-up-to-a-previous-question-i-found/64526>\
**Category:** Get Help\
**Tags:** api\
**Created:** [June 15, 2021, 1:33pm UTC](https://community.auth0.com/t/sending-invitation-emails-follow-up-to-a-previous-question-i-found/64526 "2021-06-15T13:33:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vigi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vigi/32/12799_2.png) [@vigi](https://community.auth0.com/u/vigi)\
**Post date:** [June 15, 2021, 1:33pm UTC](https://community.auth0.com/t/sending-invitation-emails-follow-up-to-a-previous-question-i-found/64526/1 "2021-06-15T13:33:07Z")

</div>

I found this question which is very helpful. Unfortunately they get closed so I can’t simply continue the same discussion.

> [@Sending Email Invitations For Application Signup](https://community.auth0.com/t/sending-email-invitations-for-application-signup/57326):
>
> Hi Auth0 Community! I’m trying to implement [Send Email Invitations for Application Signup](https://auth0.com/docs/auth0-email-services/send-email-invitations-for-application-signup), but am confused on a few things. For context; I am allowing Admin users to create new users using the Management API, using the new user’s email and setting a random password, with the email\_verified flag set to false. I’ve read the docs linked about 42.5 times, and still cannot seem to understand where to go from there. When the user is created, right now, an email is automatically sent for them to ver…

I don’t suppose there is any way to implement this if I am using a different app registration for each tenant in a multitenant environment? The domain, client id, secret and connection are hard coded here. Is there any avenue for making these dynamic? The context seems to have a reference to the connection id. Is there away to get the other info?

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [June 16, 2021, 1:27pm UTC](https://community.auth0.com/t/sending-invitation-emails-follow-up-to-a-previous-question-i-found/64526/3 "2021-06-16T13:27:38Z")

</div>

Hi @vigi,

Unfortunately, the client data isn’t available to the post-user registration hook, but instead only the following:

```auto
/**
@param {object} user - user being created
@param {string} user.id - user's ID (user GUID without "auth0|" database prefix)
@param {string} user.tenant - Auth0 tenant name
@param {string} user.username - user's username
@param {string} user.email - user's email
@param {boolean} user.emailVerified - indicates whether email is verified
@param {string} user.phoneNumber - user's phone number
@param {boolean} user.phoneNumberVerified - indicates whether phone number is verified
@param {object} user.user_metadata - user's user metadata
@param {object} user.app_metadata - user's application metadata
@param {object} context - Auth0 context info, such as connection
@param {string} context.requestLanguage - language of the application agent
@param {object} context.connection - connection info
@param {object} context.connection.id - connection ID
@param {object} context.connection.name - connection name
@param {object} context.connection.tenant - connection tenant
@param {object} context.webtask - Hook (webtask) context
@param {function} cb - function (error, response)
*/

```

What you could do is use the Management API’s [POST](https://auth0.com/docs/api/management/v2#!/Tickets/post_password_change)[/api/v2/tickets/password-change](https://auth0.com/docs/api/management/v2#!/Tickets/post_password_change) endpoint and your own email provider to send the password reset link in the email instead (following the guide: [Send Email Invitations for Application Signup](https://auth0.com/docs/auth0-email-services/send-email-invitations-for-application-signup)). Unfortunately, there isn’t a way to determine the client at that point in the auth flow otherwise.

---

<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 1, 2021, 1:28pm UTC](https://community.auth0.com/t/sending-invitation-emails-follow-up-to-a-previous-question-i-found/64526/4 "2021-07-01T13:28:15Z")

</div>

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