Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Unanswered

Power Pages - Assign Web Role on User Registration

(0) ShareShare
ReportReport
Posted on by 18

Hello Experts,

 

I am using Power Automate Flow to assign a web role to contact record when it is created (new registration through power pages). The power automate flow runs successfully and assigns contact the correct web role. However, from the power pages side, I still see permission related error on forms. It is only when I go to portal management and reassign contact to a web role, power pages works fine with correct user permissions. Any help on this would be greatly appreciated.

 

Thank you

 

ashishkapur_0-1699428831752.png

 

  • Fubar Profile Picture
    7,962 Super User 2025 Season 1 on at
    Re: Power Pages - Assign Web Role on User Registration

    There was talk about making sync available in Flow, but not sure if that's gone anywhere.  But, also be aware that you do not want to Sync everytime there is a new user if you have a busy site, as when you Sync it clears the Portal/Pages cache and the the next user that tries to load a page will get a slow page load.

     

    Where appropriate use the Authenticated User web role (or your own, but only 1 can have the tickbox for Authenticated users ticked), and your authenticated users will inherit the Table and Page permissions from that Web Role (it does not have to be directly assigned).

    An alternative is rather than Open Registration that you use Invitations, you can set Web Roles against the Invitation, and these should avoid the cache issue when the invitation is redeemed by the user.

  • ashishkapur Profile Picture
    18 on at
    Re: Power Pages - Assign Web Role on User Registration

    Hello @ragavanrajan @OOlashyn  and @Lucas001 

     

    What i noticed is an issue related to caching. When a new user register's, power automate flow assigns the correct webrole to contact. However, user still sees permission related issue on list page. But If I manually "Sync" site through edit website on make.powerpages.com and power pages refreshes cache, things start work fine.

     

    Is there a way to force "sync" though code?

  • OOlashyn Profile Picture
    3,496 Most Valuable Professional on at
    Re: Power Pages - Assign Web Role on User Registration

    Hi @ashishkapur ,

    If you are in Enhanced Data Model please see this discussion with an answer here - https://powerusers.microsoft.com/t5/Design-Build/Unable-to-automate-Web-Role-assignment-in-Enhanced-Data-Model/m-p/2437789#M1349/ . If you assign the Web Role to all users you can mark your roles as authenticated user role and it will automatically apply to all users. But, if you have scenario when user shouldn't have it and still access portal you do need to have a dynamic assignment.

  • Lucas001 Profile Picture
    2,187 Super User 2025 Season 1 on at
    Re: Power Pages - Assign Web Role on User Registration

    Hi @ashishkapur,

     

    could it be that you use the enhanced data model?

    I can see that you are assigning the adx_ table. For the new models you need to take the mspp_ tables.

    As your post is quiet new you probably face that issue.



    --------------------------------------------------------------------------------------

    Hope that helps.

    If the post solves your problem, please mark it as solution. If it helps, consider a thumbs up.

  • ashishkapur Profile Picture
    18 on at
    Re: Power Pages - Assign Web Role on User Registration

    Hi @ragavanrajan 

     

    Power automate flow assigns all users to a custom web role that I created under portal management. 

     

    Regarding the relationship, I can only see that particular one in drop down list.

     

    Thank you

  • ragavanrajan Profile Picture
    7,036 Most Valuable Professional on at
    Re: Power Pages - Assign Web Role on User Registration

    Hi @ashishkapur 

     

    Have a look at the thread which I answered a while ago. You can get clear instructions here. I can see you are choosing a different relationship. The link below for reference. 

     

    https://powerusers.microsoft.com/t5/Power-Apps-Portals/Assign-a-web-role-to-a-contact-in-PowerApp-Portal/td-p/1492849#:~:text=You%20can%20do%20this%20in,contact%20and%20web%20role%20tables.&text=Step%202%3A%20Get%20the%20user,to%20the%20web%20role%20table

     

    Also, curious to know, are you assigning a standard web role to all the contacts? If so, there is another easy way to achieve this without writing Power Automate 

     

    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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 69 Super User 2025 Season 1

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 49 Most Valuable Professional

#3
Jon Unzueta Profile Picture

Jon Unzueta 43