The channel was successfully created using the Graph API, but user2 failed to join

Copper Contributor

he channel was successfully created using the Graph API, but user2 failed to join.
What is the reason for this?

create channel API:
https://graph.microsoft.com/v1.0/teams/{ {TeamId}}/channels

Post Body:

{
       "@odata.type": "#Microsoft.Graph.channel",
       "membershipType": "private",
       "displayName": "TestPriv2",
       "description": "This channel is where we debate all future architecture plans",
       "members":
         [
             {
                 "@odata.type": "#microsoft.graph.aadUserConversationMember",
                 "user@odata.bind": "https://graph.microsoft.com/v1.0/users('user1id')",
                 "roles": ["owner"]
             },
             {
                 "@odata.type": "#microsoft.graph.aadUserConversationMember",
                 "user@odata.bind": "https://graph.microsoft.com/v1.0/users('user2id')",
                 "roles": []
             }
         ]
     }
2 Replies

@tcilys This works for me. Assign some role to 2nd user and check if it works though its not mandatory.
Mean while I will check and get back to you.

 

Further reply you will receive on your original post
https://docs.microsoft.com/en-us/answers/questions/159123/the-channel-was-successfully-created-using...

@Abhijit_MSFT 

Thank you for your answer.

Indeed, member role must be specified.

In addition, even if the creation is successful, members in the team management page often can't be refreshed, resulting in the misconception that they are not added.