question

ChoiMoonsun-9578 avatar image
0 Votes"
ChoiMoonsun-9578 asked PrathmeshPrabhu-7136 answered

ACS Sample does not work. Joining teams chat 403 forbidden

99493-image.png




I get this error...
I just tried the sample code from here:
https://docs.microsoft.com/en-us/azure/communication-services/quickstarts/chat/meeting-interop?pivots=platform-web

I was able to receive the messages, but cant not send a message.
I already did submit the form (Teams interoperability) and checked it works.

Is there anything I should change on the ACS setting?

Please help.

azure-communication-services
image.png (31.4 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @ChoiMoonsun-9578

Thanks for bringing this to our attention. We apologize for the frustration this issue may have caused. We will bring this up with ACS team and update this thread when we hear back from them.

Thanks,

-Grace

0 Votes 0 ·
MichaKluz-9638 avatar image
0 Votes"
MichaKluz-9638 answered MichaKluz-9638 commented

Hello, I have the same exact problem. I'm using the quickstart code, I successfully join the thread and I'm able to receive messages written in Teams application, but whenever I try to send a message from custom code, I receive 403 Forbidden error. Is there any update on this issue? Is there anything I can do to fix it?

· 9
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MichaKluz-9638 -- can you give a little more detail about what you are attempting to do? Are you using ACS to join a Teams meeting and chat during the meeting? Or are you trying ad hoc chat outside the context of a Teams meeting? The later capability is currently only available in limited preview.

0 Votes 0 ·

Sure @TomKaupe-7440 . I have a custom React web application using ACS to connect with a Teams Meeting. We successfully connect video, audio and screen share streams with the Teams meeting (we're able to talk and see camera streams). We'd also like to be able to chat with Teams users during meeting. I understand that this is possible by joining a main Teams meeting chat thread. Unfortunately it seems to be working only one way - my app is able to receive and display any message written in a Teams meeting chat, but I'm not able to send any message to a Teams meeting chat because whenever I try, I get 403 Forbidden error mentioned in the post. We're not interested in using the chat outside of the meeting - we're creating a live-only application.

0 Votes 0 ·

@MichaKluz-9638 are you including the "chat" scope when requesting the ACS access token?

await identityClient.getToken(acsCaller, ["voip", "chat"]);

0 Votes 0 ·
Show more comments
PrathmeshPrabhu-7136 avatar image
0 Votes"
PrathmeshPrabhu-7136 answered

[Promoting from a comment to an answer for posterity. This ended up resolving the OP's problem]

I'll note that trying to send a message "too soon" in a teams interop call can fail with 403. The reason is that the Azure Communication Services user is added to the chat thread after they join the Teams call. So, trying to send the message before joining the call / immediately after can fail. This problem should resolve within a few seconds.

This is not usually a problem, because the application only sends a message after the end-user types something.

Looking at the code snippet you posted, it looked as if you were trying to test things out by sending the message programmatically. In that case, it is possible to send the message to soon. So just double checking.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.