Share via

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": "******@teamsip.onmicrosoft.com"  
    },  
    {  
        "@odata.type": "#microsoft.graph.aadUserConversationMember",  
        "id": "MmFiOWM3OTYtMjkwMi00NWY4LWI3MTItN2M1YTYzY2Y0MWM0IyNiMzI0NmY0NC1jMDkxLTQ2MjctOTZjNi0yNWIxOGZhMmM5MTA=",  
        "roles": [  
            "owner"  
        ],  
        "displayName": "Ace John",  
        "userId": "b3246f44-c091-4627-96c6-25b18fa2c910",  
        "email": "******@teamsip.onmicrosoft.com"  
    }  
]  
}  


  
  
  
Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. Danstan Onyango 3,996 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.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.