An Azure communication platform for deploying applications across devices and platforms.
Forbidden error by creating chat thread
Jan Sr
0
Reputation points
Hi,
want to implement teams chat via ACS. Calling and chatting is initiated from angular application. Participants are AAD users having teams license.
Access token part is implemented:
List<string> scopes = new() {
"https://auth.msft.communication.azure.com/Teams.ManageCalls",
"https://auth.msft.communication.azure.com/Teams.ManageChats",
"https://graph.microsoft.com/Chat.Create",
"https://graph.microsoft.com/Chat.ReadWrite.All",
"https://graph.microsoft.com/Chat.ReadWrite"
};
// Create an instance of PublicClientApplication
var aadClient = PublicClientApplicationBuilder
.Create(appId)
.WithAuthority(authority)
.WithRedirectUri(redirectUri)
.Build();
// Retrieve the AAD token and object ID of a Teams
var result = await aadClient.AcquireTokenByUsernamePassword(scopes, user, password).ExecuteAsync();
Azure Communication service has assigned all the permissions listed in the scopes above. All the permissions are granted.
When trying to create thread with generated ACS token by:
POST https://xxx.communication.azure.com/chat/threads?api-version=2024-03-07
Getting following response:
{ "CommunicationError": { "Code": "Forbidden", "Details": [] } }
Thank you for any help.
Azure Communication Services
Azure Communication Services
Sign in to answer