cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ErikPrimozone
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
annajhaveri
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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,278)