- Reinstall the Bot: Remove and re-add the bot to the team.
- Verify Installation: Ensure the bot is correctly installed and receiving
installationUpdate
events. - Use Graph API: Add the bot to the channel using Microsoft Graph API.
- Check Permissions: Ensure the bot has the necessary permissions in Azure AD.
- Update SDK: Use the latest Bot Framework SDK.
Error : The bot is not part of the conversation roster. while sending message in channel through bot
We have a bot that can be installed in a Team as well as in personal scope. We are facing issue when bot is trying to send message in the channel where it is installed. It was working fine few days back but all of a sudden, it's throwing error:
{"error":{"code":"BotNotInConversationRoster","message":"The bot is > not part of the conversation roster."}} > Details : > teamId :19:3684c109f05f44efb4fb54a988d70286@thread.tacv2 > Error: Operation returned an invalid status code 'Forbidden' > StackTrace: at Microsoft.Bot.Connector.Conversations.CreateConversationWithHttpMessagesAsync(ConversationParameters > parameters, Dictionary`2 customHeaders, CancellationToken > cancellationToken) at > Microsoft.Bot.Connector.ConversationsExtensions.CreateConversationAsync(IConversations > operations, ConversationParameters parameters, CancellationToken > cancellationToken)
Below is my code:
var channelData = new TeamsChannelData > { > Channel = new ChannelInfo(cId), > Team = new TeamInfo(cId), > Tenant = new TenantInfo(tenantId) > }; > var conversationParameters = new ConversationParameters > { > IsGroup = true, > Bot = null, > ChannelData = channelData, > Members = null, > Activity = activity, > }; > await connectorClient.Conversations.CreateConversationAsync(conversationParameters);
The bot is able to send direct message to users
Note: - I can confirm that the bot is part on the team, and it is installed within the team. Bot is able to send one-to-one message to the user. We are facing issues only when trying to send message in a channel.
1 answer
Sort by: Most helpful
-
Kilian 345 Reputation points
2024-11-19T10:14:07.23+00:00