web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Assign a web role to a...
Power Pages
Answered

Assign a web role to a contact in PowerApp Portal

(0) ShareShare
ReportReport
Posted on by 70

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!

 

Categories:
I have the same question (0)
  • Verified answer
    ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    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. 

     

    ragavanrajan_0-1646788457894.png

     

    Step 3:  Use relate records in CDS to map the contact to the web role table. 

     

    ragavanrajan_1-1646788611415.png

     

    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

    https://powerusers.microsoft.com/t5/Power-Apps-Portals/Assign-Web-Role-for-the-Portal-contact/td-p/716720 

    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.

     

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Pages

#1
Suriyanarayanan V Profile Picture

Suriyanarayanan V 45

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 14 Most Valuable Professional

#3
DP_Prabh Profile Picture

DP_Prabh 13

Last 30 days Overall leaderboard