Graph api not returned member email using channel

Tittu Varghese 1 Reputation point
2021-08-30T18:33:47.167+00:00

I have used below code to get the channel users emails.

GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();  
  
ConversationMemberCollectionPage members = graphClient.teams("2ab9c796-2902-45f8-b712-7c5a63cf41c4").channels("19:20bc1df46b1148e9b22539b83bc66809@thread.skype").members()  
	.buildRequest()  
	.get();  

The http api call output is given below, but in SDK not returned email and userId;. How to get the user emails from the channel id.

{  
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#teams('2ab9c796-2902-45f8-b712-7c5a63cf41c4')/channels('19%3A20bc1df46b1148e9b22539b83bc66809%40thread.skype')/members",  
"@odata.count": 2,  
"value": [  
    {  
        "@odata.type": "#microsoft.graph.aadUserConversationMember",  
        "id": "MmFiOWM3OTYtMjkwMi00NWY4LWI3MTItN2M1YTYzY2Y0MWM0IyNlZWY5Y2IzNi0wNmRlLTQ2OWItODdjZC03MGY0Y2JlMzJkMTQ=",  
        "roles": [],  
        "displayName": "Jane Doe",  
        "userId": "eef9cb36-06de-469b-87cd-70f4cbe32d14",  
        "email": "jdoe@teamsip.onmicrosoft.com"  
    },  
    {  
        "@odata.type": "#microsoft.graph.aadUserConversationMember",  
        "id": "MmFiOWM3OTYtMjkwMi00NWY4LWI3MTItN2M1YTYzY2Y0MWM0IyNiMzI0NmY0NC1jMDkxLTQ2MjctOTZjNi0yNWIxOGZhMmM5MTA=",  
        "roles": [  
            "owner"  
        ],  
        "displayName": "Ace John",  
        "userId": "b3246f44-c091-4627-96c6-25b18fa2c910",  
        "email": "ajohn@teamsip.onmicrosoft.com"  
    }  
]  
}  


  
  
  
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,068 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Danstan Onyango 3,816 Reputation points Microsoft Employee
    2021-09-01T10:20:08.853+00:00

    You must be on an older version of the SDK. I see these field when using the latest SDK which is SDK version 4.3.0 at this point.