Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Find all SharePoint sites a User has access to

Like (0) ShareShare
ReportReport
Posted on 19 Jul 2022 18:20:51 by 123

Hello,

 

I would like to create a flow that lists all SharePoint Sites a User has access to. 

 

The Flow will be triggered from the onStart of a power app. This will run a cloud flow passing the users's email address to the flow. 

 

I figured this could be done by sending an HTTP request, but I am struggling with the API call. 

 

After retrieving the list of sites available to the user, return the info to the Power App for the user to see in a data table. It would be nice to retrieve the access level that the user has for each site as well, but not required. 

 

Any examples or suggestions will be greatly appreciated!

 

 

  • Turreaux Profile Picture
    6 on 09 Feb 2023 at 19:40:22
    Re: Find all SharePoint sites a User has access to

    I was able to mostly use your solution but I need to search for a specific user. Is there a way to specify which user rather than all users?

  • ajeanjacket Profile Picture
    15 on 27 Jul 2022 at 14:55:31
    Re: Find all SharePoint sites a User has access to

    Would this solution work based on a form submission trigger? I am trying to automate creating folders and dumping the form's attachments into different sharepoint libraries based on a particular question from the form.

    Basically, there are different properties in my portfolio, each with a different teams channel/ SharePoint page. Based on the property the on-site team member fills the form out for, I would like the automation to populate the site address into the "create folder" and "create file" actions I have in my flow. I previously tried to copy the attachments scope I created and paste them into each switch case per property, but that caused too many actions. I hope this makes sense and appreciate the help!
    @CamCov 

  • CamCov Profile Picture
    123 on 20 Jul 2022 at 17:51:36
    Re: Find all SharePoint sites a User has access to

    @CamCov this was a silly question @fchopo sorry for the confusion. You directed me to the right place. I didnt realize SharePoint HTTP requests default at 100 entries returned. All better now!

  • CamCov Profile Picture
    123 on 20 Jul 2022 at 14:23:15
    Re: Find all SharePoint sites a User has access to

    @fchopo This is very close to what I need. This article only shows how to pull down site collections. I need to go one step further to the sites themselves. 

    To be clear, all of the sites located under the Active Sites page on SharePoint Admin Center -> 

    CamCov_0-1658326981725.png



    Also, within SharePoint Admin Center, how can I view all Site collections?  

  • Verified answer
    fchopo Profile Picture
    7,968 Super User 2025 Season 1 on 20 Jul 2022 at 09:06:29
    Re: Find all SharePoint sites a User has access to

    Hi @CamCov 

    You could do the following steps:

     

    1) Get all site collections in a Tenant. You can see the workflow here: Get All Site Collections Of Office 365 Tenant In MS Flow (c-sharpcorner.com)

     

    2) For each site, you can check if the user has permissions using the "Send an HTTP Request to SharePoint":

    sp-site-url.png

     

    Hope that helps!

    Ferran

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

Overall leaderboard