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 Automate / get all sharepoint use...
Power Automate
Unanswered

get all sharepoint users from all sharepoint sites

(0) ShareShare
ReportReport
Posted on by 4

Hello,

how can I retrieve a list of all Sharepoint sites with the correct users that have permission to the Sharepoint sites?

I can retrieve the users for one site, but I don't know how to loop through all Sharepoint sites.

 

 Screenshot 2023-02-01 165348.png

can somebody please help me 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Alyssableize101 ,

     

    Please take a look at this post.

    https://stackoverflow.com/questions/51616560/sharepoint-get-all-sites-and-all-sub-sites-using-sharepoint-online-rest-api

     

    I believe it will list all the sites you have access to.

     

    Best Regards,

    Wearsky

  • Alyssableize101 Profile Picture
    4 on at

    Hi @v-xiaochen-msft 
    Thanx for your response!
    I looked at your link, but I think I found a easier solution. 

    I used the https:// [name}-admin.sharepoint.com, where I add the Site Address. 
    Now I can loop through all Sharepoint sites, but now I need to loop through all Sharepoint sites and then another for each loop through all Sharepoint users. 
    So one step closer, but not there yet

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Alyssableize101 ,

     

    Which action in Flow calls the API you provided in your reply? I used the Api you provided but it failed.

     

    vxiaochenmsft_0-1675389142682.png

     

    Best Regards,

    Wearsky

  • Alyssableize101 Profile Picture
    4 on at

    Hi @v-xiaochen-msft ,

    I think your API call is fine, but you need to be Sharepoint Administrator. 

    Otherwise the run is going to fail. 

    So I figured out that with this API call, I can get all Sharepoint sites with all the "site owners" and "created by". 
    I also need all role assigments from all user (see the second picture)
    I don't know how to loop through all Sharepoint sites, Sharepoint users and the RoleAssignments. 

    Do you know how to do this?

     

    Alyssableize101_0-1675764763049.pngAlyssableize101_1-1675764880170.png

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 552

#2
Valantis Profile Picture

Valantis 388

#3
11manish Profile Picture

11manish 375

Last 30 days Overall leaderboard