cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

HTTP request for getting a list of all users on a SharePoint site

Hi! I'm looking for a way to create a list of all users that belong to a SharePoint site. This is what I've made so far:

 

ErikPrimozone_1-1609826129933.png

 

However, the request runs forever and the status message says BadGateway. The same thing happens if I change my address to the main page (that is, removing /sites/technology).

 

Anyone knows what I could be doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions

@ErikPrimozone , as far as i know there isnt any out of the box trigger available to start the flow when users are assign permissions to site or subfolder. 

 

However you can setup alert policies from M365 compliance center refer this blog https://www.anupams.net/alert-policies-office-365/ or you can setup alerts from audit logs based on activities refer following documentation

https://docs.microsoft.com/en-us/microsoft-365/compliance/search-the-audit-log-in-security-and-compl...

https://docs.microsoft.com/en-us/microsoft-365/compliance/create-activity-alerts?view=o365-worldwide

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

6 REPLIES 6
Super User
Super User

@ErikPrimozone , are you trying to get users from Technology Site Group, as you have GetByName('technology')/users in the Uri, please make sure technology group exist, or replace it with a valid group name. Also are you looking for all users of site or users of specific group? The Uri that you have used gives users of specific group.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

Hi @annajhaveri and thanks for the quick reply.

 

Yes, I'm looking only to extract users from that group in particular. Although I'm not sure if the 'technology' is the correct term to use in GetByName. I simply assumed that the name would be the same as the last word in the URL. How can I be sure that I'm using a valid group name?

Are you looking to get users from specific SharePoint group? Then first go to following URL in your SharePoint site to see what SharePoint Groups exists in the site, replace <siteURL> with your site URL. On this page you will see the groups where type is mentioned as SharePoint group and use that name in the Uri of the Flow action.

https://<siteURL>/_layouts/15/user.aspx

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

Thanks @annajhaveri, your solution worked great for listing the user groups in an HTTP request.

I do realize that my inquiry should have been more detailed, however. My end goal here is to get a notification when additional permissions are added to any part of the site. Since the groups I find at https://<siteURL>/_layouts/15/user.aspx are only top-level, I can't tell when an indidivudal user has been granted unique permissions to a subfolder.

Do you have any ideas here?

@ErikPrimozone , as far as i know there isnt any out of the box trigger available to start the flow when users are assign permissions to site or subfolder. 

 

However you can setup alert policies from M365 compliance center refer this blog https://www.anupams.net/alert-policies-office-365/ or you can setup alerts from audit logs based on activities refer following documentation

https://docs.microsoft.com/en-us/microsoft-365/compliance/search-the-audit-log-in-security-and-compl...

https://docs.microsoft.com/en-us/microsoft-365/compliance/create-activity-alerts?view=o365-worldwide

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

Sounds good – I'll take a look. Thanks @annajhaveri!

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (29,633)