Skip to main content

Notifications

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

(0) ShareShare
ReportReport
Posted on 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
    Inge_A 3 on at
    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
    Lucas001 2,089 on at
    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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard

Featured topics