Forum Discussion
Anthony-123
Mar 10, 2022Iron Contributor
GET group members orderBy=displayName isn't sorting
I'm new to Graph but I'm referencing this https://docs.microsoft.com/en-us/graph/query-parameters#orderby-parameter The users?$orderby=displayName example works just fine for me. What I want to do is get members of a group and sort that by display name.
So, when I run the following query I'm still getting a random list of users in the group in no apparent order.
https://graph.microsoft.com/v1.0/groups/{groupid}/members/microsoft.graph.user?$orderBy=displayName
I posted this question on another forum and someone says it's working for them. How come it no work for me?
3 Replies
- Licantrop0
Microsoft
Anthony-123 this is considered an Advanced Query so other than
consistencyLevel=eventualheader, it requires also$count=truequery parameter.
Try it here on Graph Explorer. - I'm seeing the same behavior as you... just do the sorting client side.
- Anthony-123Iron ContributorThat's assuring to know I'm not the only one.
Any thoughts on this? https://powerusers.microsoft.com/t5/Building-Flows/Sort-a-List-of-Group-Members-Select-for-Adaptive-Card-choices/m-p/1495119