graph.microsoft.com Chats: The caller must be one of the members specified in request body.

Wilhelm Schmidt 1 Reputation point
2021-11-02T12:55:55.23+00:00

could someone help me please?
I'm trying to create a chat

the user ID are 100% correct
I can create a chat for myself but not for other users in my organization

Post https://graph.microsoft.com/v1.0/chats
{
"chatType": "group",
"topic": "Group chat title",
"members": [
{
"@odata.type": "#microsoft.graph.aadUserConversationMember",
"roles": [
"owner"
],
"user@odata.bind": "https://graph.microsoft.com/v1.0/users('127e960d-139e...............')"
},
{
"@odata.type": "#microsoft.graph.aadUserConversationMember",
"roles": [
"owner"
],
"user@odata.bind": "https://graph.microsoft.com/v1.0/users('eaf991f3............................')"
}
]
}

Response:
Bad Request - 400 - 99ms
{
"error": {
"code": "BadRequest",
"message": "The caller must be one of the members specified in request body.",
"innerError": {
"date": "2021-11-02T12:48:02",
"request-id": "f32df772-.................................",
"client-request-id": "35cd9bb2-d.................."
}
}

Microsoft Graph Notifications API
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
1,712 questions
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
5,384 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ChetanSharmamsft 781 Reputation points Microsoft Employee
    2021-12-11T16:01:40.31+00:00

    For more visibility, adding the answer from the comment section.

    @Wilhelm Schmidt - In members property you have to include your user id also.
    For members property description-List of conversation members that should be added. Every single user, including the user initiating the create request, who will participate in the chat must be specified in this list.

    Thanks,
    Chetan Sharma


    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.

    No comments