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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Only list SharePoint i...
Power Apps
Unanswered

Only list SharePoint items where user has edit rights in Power Apps

(0) ShareShare
ReportReport
Posted on by 14
I want to implement vertical gallery for my SharePoint document library. I want to display documents only where logged in user has edit rights. How can I apply this filter to check if user has access to that docs or not and only list those items on Power Apps. I am using SharePoint connector.
Categories:
I have the same question (0)
  • vipuljain03 Profile Picture
    675 Super User 2026 Season 1 on at
    You can use a Power Automate Flow to Get User Permissions - this flow will retrieve the user's permissions for each document and returns a list of documents the user can edit. Your Power Apps gallery will then use the output of this flow.
     
    High-level steps which you can use in a flow:
     
    • Trigger: "Power Apps" trigger. This will receive the user's email address from Power Apps.

    • Get user profile (SharePoint): Use this action to retrieve details about the user.

    • Get files (properties only) (SharePoint): Use this action to retrieve only the metadata (including item ID) of the files in your document library. Don't retrieve the file content yet. This is important for performance.

    • Loop (Apply to each): Loop through the files retrieved in the previous step.

    • Get item permissions (SharePoint): Inside the loop, use this action, providing the file's item ID. This will return the permissions for the specific file.

    • Condition: Check if the current user has "Edit" permissions in the returned permissions object. The structure of the returned permissions object might vary slightly, but it will usually contain a property or role definition stating the permissions for the user. The condition might look similar to:
      contains(items('Apply_to_each')?['d']?['Roles']?['results'], 'Editor')  // or similar, adjust as needed
       
      {
        "d": {
          "Roles": {
            "results": [
              "Reader",
              "Editor" // The user has Editor access
            ]
          }
        }
      }


    • Append to Array Variable: If the condition is true (user has edit permissions), append the file's metadata (e.g., file name, URL, etc.) to an array variable.

    • Response (Power Apps): After the loop, send the array variable back to Power Apps.
    You can send the response of this flow back to Power Apps.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 414

#2
Valantis Profile Picture

Valantis 387

#3
timl Profile Picture

timl 344 Super User 2026 Season 1

Last 30 days Overall leaderboard