Invite users from the parent organization¶
Customer/Partner organizations may sometimes need help performing administrative tasks from members of the parent organization. Also, members of an organization who are also members of the parent organization might want to bring in more members from the parent organization.
For such scenarios, Asgardeo organizations can invite parent organization users to join their organizations. When you invite users, you may assign them to specific groups to provide the right level of permissions. Once the users accept the invitations, they will be added to the organization and be assigned to the specified groups.
Prerequisites¶
In order to invite users from the parent organization, get to know the usernames of the users through an offline channel.
Invite users¶
If a user of the organization with Asgardeo Console access needs to invite a user from the parent organization, follow the steps below.
- Login to your organization using the link
https://console.asgardeo.io/t/{root-organization-name}/o/{organization-id}
. - Go to User Management > Users and click ** Add user**. From there, select Invite Parent User.
- Enter the usernames of the user that you want to invite to the organization. You can enter multiple usernames by pressing enter after each username input.
- Select the groups that you want to assign to the invited users.
- Click Invite.
-
The invited users will receive an email notification with the invitation link which they can click to accept.
Note
If you are part of an organization hierarchy, you cannot directly invite users from other ancestors except for your parent organization.
If a user, who is a member of both the organization and parent organization, wishes to invite more members from the parent organization, follow the steps below.
- Login to your organization (root) on the Asgardeo Console.
- Go to Organizations and select the organization to which you wish to invite users.
- Switch to that organization.
-
Go to User Management > Users and click + Add user. From there, select Invite Parent User.
-
Enter the usernames of the users that you want to invite to the organization. You can enter multiple usernames by pressing enter after each username input.
- Select the groups that you want to assign to the invited users.
- Click Invite.
-
You can see whether the invitation is successful or not as follows.
-
The invited users will receive an email notification with the invitation link. The invited users can accept the invitation by clicking the link.
Accept invitations¶
-
The invited users will receive an email similar to the following, containing an invitation link valid for 72 hours.
-
Click the Accept Invitation button in the email to accept it.
-
Once the invitation is accepted, the invited users will be displayed in the Asgardeo Console as follows.
Manage invitations¶
Inorder to view or delete the invitations via Asgardeo Console:
- Login to the relevant organization space of the Asgardeo Console.
- Go to User Management > Users and click Invitations tab.
-
You can view the list of invitations that are sent to the users of the parent organization with their status.
-
If required, invitations can be deleted by clicking the Delete icon.
Invite users without sending email notifications from Asgardeo¶
In order to disable sending email notifications internally from Asgardeo, manageNotificationsInternally
property can be set to false in Parent Organization's User Invitation API. The following sample request can be
used to obtain the confirmation code without sending email notifications.
curl --location --request POST 'https://console.asgardeo.io/t/{organization-name}/o/api/server/v1/guests/invite' \
--header 'Authorization: Bearer <access-token-obtained-for-the-organization>' \
--header 'Content-Type: application/json' \
--data '{
"usernames": [
"[email protected]",
"[email protected]"
],
"roles": [
"f5b761ca-62f2-48ba-935b-f7b460f58e5c",
"657fgq22-62f2-48ba-935b-f7bfgh6438fd"
],
"groups": [
"48badf-rty20-48ba-935b-f7b460f58e5c",
"fd234100-c115-45dc-ad11-70846b783866"
],
"properties": [
{
"key" : "manageNotificationsInternally",
"value" : "false"
}
]
}'
Sample Response will contain the confirmation code as follows.
[
{
"username": "[email protected]",
"result": {
"status": "Successful"
},
"confirmationCode": "390feadd-4e03-404c-95bd-1c451acc2bad"
},
{
"username": "[email protected]",
"result": {
"status": "Successful"
},
"confirmationCode": "7474473c-64d4-4a11-8f50-fe5c63bae88f"
}
]
If you are sending the invitation email through an external service, include this confirmation code, which need to be accepted through following invitation accepting API. If your applications wants to proceed parent user invitation flow without any email sending, applications can invoke the following API call as the next step.
curl --location --request POST 'https://console.asgardeo.io/t/{organization-name}/o/api/server/v1/guests/invitation/accept' \
--header 'Authorization: Bearer <access-token-obtained-for-the-organization>' \
--header 'Content-Type: application/json' \
--data '{
"confirmationCode": "2663329b-c8c5-4c71-9500-9ea8c4e77d94"
}'