Skip to main content

Notifications

Community site session details

Community site session details

Session Id : SYGDZEdumpcG0Uu35Yy+ua
Power Pages - Security
Unanswered

Power page is caching user webroles and gives error for my contact that got a web role assign through a process workflow

Like (0) ShareShare
ReportReport
Posted on 27 Jun 2023 12:01:12 by 3

Hi all, 

I have a power page where new contacts can register itself.

There is a table permission on account entity where the user can update the account if they have the correct web roles.

My web page access controle rule for that page is set to everybody to make it simple. (So everybody can see this page).

I have a dataverse process workflow that assigns a web role when the contact is created when a specific condition is true.

When a new contact is registered, the flow is triggered and the correct web role is assigned.

However, my page always gives an error that I don't have the permissions.

Even when I log out and log in again, it keeps showing me the message.

 

I first have to manually clear the cache with an admin role (URL: /_services/about).

And if I then log in again with the newly created contact, I can see the page.

I first thought the cache would be cleared after 15 minutes but after a half hour of waiting, I still get the same error.  So only with manually clearing the cache, it works.

 

Does anybody have any ideas of how I can assign web roles for newly registered contacts and making sure they can immediately see my page that is assigned to the correct web role?

 

Thank you so much for the help!

 

  • Inge_A Profile Picture
    3 on 28 Aug 2023 at 07:11:54
    Re: Power page is caching user webroles and gives error for my contact that got a web role assign through a process workflow

    Thank you for your response. I logged a Microsoft bug for this issue. Awaiting their solution now..

  • Lucas001 Profile Picture
    2,120 Super User 2025 Season 1 on 14 Aug 2023 at 14:17:01
    Re: Power page is caching user webroles and gives error for my contact that got a web role assign through a process workflow

    Hi @Inge_A,

     

    what you can do is use the liquid user() and see if the user is having a name with user().name as they register and the account is set up, you can directly use the liquid template. Use the user() object inside a <p>-Tag and show hide/remove your form depending on the value inside the <p>-Tag. If the <p>-Tag is empty the user is not registered.

    Not the greatest solution, but it should work.

     

     

    Other than that it seems that the cache at your page is having an issue. And as you already mentioned it should be fine after 15 min.

     



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

    Hope that helps.

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

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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

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

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,508 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,369 Most Valuable Professional

Leaderboard

Featured topics