Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - Power Apps Portals
Unanswered

How to achieve row level security in power apps portal

(0) ShareShare
ReportReport
Posted on by 121

Hello,

I want to achieve row-level security in my power apps portal application. I have 4 users, from which 3 of then are associated with one site each. and I have one superuser named Alex,  mentioned in the below screenshot, who has the access to all the sites

 

please check the below screenshot.

praneshJ_0-1600241731991.png

 

When John logs in to the portal using his credentials, he should see only Site Lily details,
Mike logs in to the portal using his credentials, he should see only Site Rose details,

but when Alex logs in to the portal he must see all three sites Lily, Rose, Lotus

 

How do I achieve this in the power apps portal?

 

Any kind of quick help is really appreciated!!

 

Regards,

Pranesh

  • justinburch Profile Picture
    Microsoft Employee on at
    Re: How to achieve row level security in power apps portal

    Thanks @praneshJ, I had a feeling this was the case. With this knowledge, I believe your issue is in your Entity Permissions. As I don't know the relationships, I'm making some assumptions with this proposed set of Web Roles & Permissions:

    1. Superuser Web Role
      1. Site Activity Entity Permission
        1. Global Read, Append, Append To
      2. Site Entity Permission
        1. Global Read, Append, Append To
    2. Standard Web Role
      1. Site Activity Entity Permission
        1. Contact-Based
        2. On Relationship: Contact lookup on Site Activity
        3. Read, Write, Append, Append To, Create
      2. Site Entity Permission
        1. Parent-Based
        2. On Relationship: Site Lookup on Site Activity
        3. Read, Append, Append To
  • praneshJ Profile Picture
    121 on at
    Re: How to achieve row level security in power apps portal

    Hi @justinburch,

     

    Thanks for the reply,

    yes, it's correct as you mentioned, but the create form opens for creating a new record for 'site activity', and the site is a lookup field,

    as shown in the image below,

    praneshJ_0-1600405895892.png

    and that site lookup field is not getting filtered according to the logged-in user.
    when John, Mike, and Smith logs in to the portal application, they should see the only site associated with them.
    and when Alex logs in, He should see the all sites.

     

    Please let me know if I am able to clarify your doubt.

     

    Please comment on this.

  • justinburch Profile Picture
    Microsoft Employee on at
    Re: How to achieve row level security in power apps portal

    Hi @praneshJ,

    I'm going to paraphrase, please let me know if anything here is wrong:

    You have a view showing All Site records. With proper Entity Permissions, this list correctly only shows Site records where the logged in user is associated to the Site - in your example, John, Mike and Smith each see one Site, Alex (Global Read) sees all. When John, Mike, or Smith click the Create button, you open a Create entity form to create a new Site record, and this record has a self-referential lookup to a Site record, but this lookup allows each to see more than their own Site.

    Is this correct?

  • oliver.rodrigues Profile Picture
    9,342 Most Valuable Professional on at
    Re: How to achieve row level security in power apps portal

    take a look at this article: https://www.dancingwithcrm.com/custom-lookup-filtering-powerapps-portal/

    you need a bit of code but it is straight forward enough

     


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

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • praneshJ Profile Picture
    121 on at
    Re: How to achieve row level security in power apps portal

    I have achieved row-level security in the entity list on the web page, 

    I have the site column in my entity list and that is getting filtered correctly based on the logged-in user. I have enabled Create functionality with the entity list, and when I click on the create button, it opens ups the create form, in that form, there is a site lookup field, but it is not getting filtered as the logged-in user instead, it showing all the sites in the lookup field, irrespective of the user logged in. 
    I need to filter that site lookup field on the Create form as well,

     

    what is the best possible way to achieve it?

     

    Quick help is really appreciated! 

     

  • oliver.rodrigues Profile Picture
    9,342 Most Valuable Professional on at
    Re: How to achieve row level security in power apps portal

    Hi

     

    I think actually that might be easier than it looks, have you looked into Entity Permissions?: https://docs.microsoft.com/en-us/powerapps/maker/portals/configure/assign-entity-permissions

     

    the only trick here is that you will need to create two entity permissions for the same entity, but linked to a different Contact relationship (I am assuming users / super user are two different lookup to the Contact entity)

    when having multiple permissions, the Portals should combine and give the show all results


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

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users 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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June 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
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 1

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 1

#3
surya narayanan Profile Picture

surya narayanan 35