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

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

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard