How to successfully add participants to a chat thread? Encountered "invalidPariticipants" 403 error

Xin 40 Reputation points Microsoft Employee
2024-07-29T13:26:38.9866667+00:00

Hi team,

We are applying the ACS service to build call and chat for Teams users and external users in mobile platform. We encountered the "invalidPariticipants" issue when following the wiki to create a chat thread with specified participants, regardless of whether the participant type is an Azure Communication Service user(CommunicationUserIdentifier) or a Teams user(MicrosoftTeamsUserIdentifier) for CommunicationUserIdentifier. Our code constructing participants is:

const createChatThreadOptions = {
      participants: [
        {
          id: { microsoftTeamsUserId: '{AAD object id of the Teams user}' },
          displayName: 'test account(Teams user)'
        },
        {
          id: { communicationUserId: '{Azure communication user identity}' },
          displayName: 'An ACS user'
        }
      ]
    };
    const createChatThreadResult = await chatClient.createChatThread(createChatThreadRequest, createChatThreadOptions);

The chat thread created successfully, but the participants added failed. As shown in the figure below: enter image description here

But as we learned in this wiki, the CommunicationUserIdentifier participant types can be varied - ACS user or a Teams user are both accepted.

Is our usage incorrect? Or is this a known issue? Thanks in advance.

Azure Communication Services

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.