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

Community site session details

Session Id : lq5iNiSN+I1ISWT8FxOyHH
Power Pages - General Discussions
Unanswered

Power Pages - Assign Web Role on User Registration

Like (0) ShareShare
ReportReport
Posted on 8 Nov 2023 07:34:53 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
    8,058 Super User 2025 Season 2 on 21 Nov 2023 at 21:59:17
    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 21 Nov 2023 at 07:27:57
    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 11 Nov 2023 at 01:09:50
    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,268 Super User 2025 Season 2 on 10 Nov 2023 at 14:54:30
    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 08 Nov 2023 at 11:16:01
    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 08 Nov 2023 at 08:22:41
    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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#2
Lucas001 Profile Picture

Lucas001 48 Super User 2025 Season 2

#3
KevinGador Profile Picture

KevinGador 44 Super User 2025 Season 2