In this post, we will look at Power Apps portals and redeeming invitation codes. These come into play when you have an existing contact in Dynamics 365 that you would like to register as a Power Apps portal user. As each Portal user becomes a contact in Dynamics 365, you may now want this existing contact to simply “sign up” in your portal. Instead, you can send them an invitation code that will allow them to sign up using the code, and the contact will then be the same one in Dynamics 365. Let’s look at how to do this.
First, there is an out-of-the-box workflow that is set up on the Invitations entity. This workflow is used to send a portal invitation to a contact. We will need to configure this workflow so that it can be used. In Processes, find Send Invitation:
Next, deactivate it and click on Set Properties of the Create Email step:
You will see below.
Let’s add a From and To for this email like below:
And let’s add some text to show the invitation code. We will provide a URL and paste the invitation code for the user (we could provide a hyperlink right that inserts the redeem code into the hyperlink as well):
Click Save and Close, and let’s test this out.
Create a new contact (or select an existing one that is not a portal user):
In the toolbar, click Create Invitation:
We see the following:
On Saving, we see a section displayed called When Redeemed. Here we can tell it what to do when the contact is redeemed, such as assigning web roles to the user.
Clicking on Advanced will also display the invitation code if you needed to simply email it manually to a user:
Let’s now run the workflow that sends the email invitation to the user:
We see the email has been created:
Clicking on the link, the user can enter the invitation code into the Redeem invitation section and click Register:
We get a message that we’re redeeming this code, and to enter an email, username and password:
On clicking Register, the user is taken to the Profile page, and they’re now registered to use the portal as this contact in Dynamics 365:
If you need to, you can view the completed or pending invitations as well: