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 a liste of all sit...
Power Automate
Unanswered

Get a liste of all site members without the site owners

(0) ShareShare
ReportReport
Posted on by 5

Hi All,

 

I'm trying to figure out how to get a list of all members of a given sharepoint site without the actual site owners. 

 

I was able to get the owners and members using the graph-API http requests.

https://graph.microsoft.com/v1.0/groups/{group-ID}/owners

https://graph.microsoft.com/v1.0/groups/{group-ID}/members

 

Result

Owner: John, Grant

Member: John, Claudia, Paul, Grant, Andrea

 

I'd like to remove John and Grant from the members list

Any ideas how to do this?

Cheers,
Bügelperle

 

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

    Hi @Bügelperle ,

     

    Please refer to below steps:

    1. I compose your Owner/Member as test data, and initialize a variable to store the result later.

    vwenjuanmsft_0-1682669282912.png

    2. Split "Member" and make comparison with "Owner". If it's contained in "Owner", no action will be taken. If not, append the object to variable.

    3. Finally we will use below function to delete extra comma and blank space.

    take(variables('vartest'),sub(length(variables('vartest')),2))

    vwenjuanmsft_1-1682669373729.png

    Here's the result:

    vwenjuanmsft_2-1682669532694.png

     

    Community Support Team _ Wenjuan Zou

    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

  • Verified answer
    Expiscornovus Profile Picture
    33,183 Most Valuable Professional on at

    Hi @Bügelperle,

     

    An alternative approach could be to use the two arrays and filter them using a Filter Array action. @DamoBird365 has blog about this Except approach:

    https://www.damobird365.com/efficien-union-except-and-intersect-great-method/

     

    Below is an example for this scenario.

     

    1. The Filter array uses the below expression in the From:

    outputs('Send_an_HTTP_request_-_Members')?['body']['value']

     

    2. And the below criteria is used (in advanced mode)

    @not(contains(outputs('Send_an_HTTP_request_-_Owners')?['body']['value'], item()))

     

    except_method.png

  • Bügelperle Profile Picture
    5 on at

    @Expiscornovus  & @v-wenjuan-msft thanks for your support. You guys helped me a lot.

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard