Get group members with MS Graph?

Regular Contributor


I am trying to get the list of members of a specific group but I am getting nothing.


This is how I am making the call: 

public componentDidMount(): void {
.get((error: any, user: MicrosoftGraph.User, rawResponse?: any ) => {
name: user.displayName,
email: user.mail,
phone: user.businessPhones[0]

At this point the state is completly empty: 

 {name: "", email: "", phone: "", image: null}
         email: ""
         image: null
         name: ""
         phone: ""

Obviously I am making a misstake in the componentDidMount() but I can't understand what is the error? 


Best regards


3 Replies

Are you looking to use MS Graph API to get members in a given Office 365 group? If yes, then you can try this.

1) First get the group id of the group
2) Second use the following API call to get the list of group members in it.



Hope this helps. 

I would suggest you first test the query in the Graph Explorer. 


Thanks but I am actually interested in team sites members, which users belong to a Team site