What is member id in remove member from team API?

Rupen 0 Reputation points
2023-09-01T13:36:27.8733333+00:00

This is regarding sample provided here, the provided sample for C# is as below:

var graphClient = new GraphServiceClient(requestAdapter);
await graphClient.Teams["{team-id}"].Members["{conversationMember-id}"].DeleteAsync();

What is the conversationMember-id? is it same as userid? I tried with userid and email address, but keep getting error message that the member id not found. Any API that can confirm the conversationMember-id value?

The return message: Invalid membership id provided: 'c5af2c18-ad19-408e-ad05-aec9f3dd3cc7'

I am able to add member and have confirm that the require permissions are set in the portal.

See screenshot below which confirms userid :

User's image

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

1 answer

Sort by: Most helpful
  1. TH-4749-MSFT 3,295 Reputation points
    2023-09-07T20:57:50.8466667+00:00

    Hello Rupen,

    Thanks for reaching out. The conversation id is different from a user id. When running the Teams/[TeamId]/members the id field represents the conversation id. The userid field represents the GUID of the user associated with the user account.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    Thanks.