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

fish 20 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
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
847 questions
0 comments No comments
{count} votes

Your answer

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