Microsoft Teams
A Microsoft customizable chat-based workspace.
9,952 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I want to post the card that contains text of message to different channel.
How can I do it? I used teams toolkit to use messaging extension.
Currently I used below code inside of handleTeamsMessagingExtensionSubmitAction
to post the card but it doesn't work. error is Error posting card: RestError: Authorization has been denied for this request.
const newConversation = await context.adapter.createConversationAsync(
credentialsFactory.appId,
channelId, // Use the extracted channel ID
conversationReference.serviceUrl,
"https://graph.microsoft.com/.default",
conversationParameters, // Pass the conversation parameters
async (newContext) => {
await newContext.sendActivity(message);
}
);
Hello @aya - Please refer this documentation:
https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/conversations/send-proactive-messages?tabs=dotnet