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 / how to apply filter on...
Power Automate
Answered

how to apply filter on "@odata.type": "#microsoft.graph.user" only on users

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Mates,

 

I need to extract the Azure ad group users using MS graph API, API call pulls out all members from the groups.

This means Azure ad group users and a few other groups as members.

I would like to apply a filter to pull out only users from the group.

 

 {
 "@odata.type": "#microsoft.graph.user",
 "id": "7b0f0b83-406-b25a-1e70cc520ab0",
 "displayName": "xyz",
 },
 {
 "@odata.type": "#microsoft.graph.group",
 "id": "cd243e66-df16-2efc34ff2332",
 "displayName": "xyzgroup",
 },
 {
 "@odata.type": "#microsoft.graph.group",
 "id": "9c9855cd-4d16-0bf91ba16790",
 "displayName": "xyzgrou2",
 }

 

API : 
https://graph.microsoft.com/v1.0/groups/e917f888-4e6b-b1f1-40a58159/members

 

normally i can select like $Select=id, displayname but can i select only users?

Please assist me

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @Anonymous,

     

    You can use the Odata cast to only retrieve members which are of type user.

     

    Below is an example from the Graph API documentation:

    https://learn.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=http#example-3-use-odata-cast-to-get-only-a-count-of-user-membership

     

     

    GET https://graph.microsoft.com/v1.0/groups/{id}/members/microsoft.graph.user

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Expiscornovus  Thank you

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 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard