
Announcements
Hello World! I have a scenario in which I want to automatically (using PowerAutomate) assign a web role to a new contact in a PowerApp Portal app.
When an external user creates a new external account, (aka a new contact record), how can I use powerautomate to assign a web role to that contact?
My use case would be to have an external client assigned a web role based on their selection of a purchase using an ecommerce site.
@v-siky-msft posted a solution in 2020 but it was not a PowerAutomate Flow (may have been depecated).
Thanks!
Hi @Newbie150
Pre: Make sure you create appropriate web roles first in the Power Apps Portals.
You can do this in Power Automate CDS Connector using contact and web role tables.
Step 1: Use the CDS trigger and use contact table to check whether contact is added or modified
Step 2: Get the user using the "Web Roles" Table and match it with the Web role you have created.
Step 3: Use relate records in CDS to map the contact to the web role table.
Note: This will only work if the user trying to sign in to the portal and update their profile page. The event is when they press the "update" button.
Note 1: For Portal, everything is a contact. If your user sign in then the portal will create contact.
Additional: You can assign variables and check for flag value and play with your own logic to relate the contract.
In addition, have a look at the below thread, for more information
Hope it helps.
------------
If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.