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

Notifications

Announcements

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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard