Forum Discussion

Peter_Kaagman's avatar
Peter_Kaagman
Brass Contributor
May 03, 2024
Solved

Listing groups members

Hi there,

 

Im using Perl LWP to get some information on groups: owners and members. The strange thing is that listing owners works without any problem, getting the users gives me a return code 200 but with empty content... no users. While I know the group does in fact have members.

The URL I use is like: 

https://graph.microsoft.com/v1.0/groups/<some_id>/members/?$select=id,displayName,userPrincipalName&$count=true

 

- I added the $count and set consistencylevel  to eventual (just in case).

- Almost the same URL (owners instead of members) does work.

- Running the same URL in Graph explorer does in fact return the members

- As far as I can see the permission for members is the same as for owners

 

Kindof at a loss at the moment. Can you help?

 

Peter

  • Awnsering my own:

    Ok... turned out I needed more than group.read.all and user.read.all. Added some extra permissions and everything worked like expected.

1 Reply

  • Peter_Kaagman's avatar
    Peter_Kaagman
    Brass Contributor
    Awnsering my own:

    Ok... turned out I needed more than group.read.all and user.read.all. Added some extra permissions and everything worked like expected.

Resources