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
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.
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?
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.
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.
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
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.
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.
Fubar
69
Super User 2025 Season 1
oliver.rodrigues
49
Most Valuable Professional
Jon Unzueta
43