BotBuilder
1 TopicGetting a 401 when trying to create a conversation
Hello ! Using the node botbuilder SDK, I am trying to setup my bot to proactively create a conversation in a public channel on Teams. However, I keep getting 401 responses from the API, with no further details. You can find my code attached bellow: const adapter = new CloudAdapter( new ConfigurationBotFrameworkAuthentication( { MicrosoftAppId: process.env.MS_BOT_APP_ID, MicrosoftAppTenantId: process.env.MS_CLIENT_ID, }, new ConfigurationServiceClientCredentialFactory({ MicrosoftAppId: process.env.MS_BOT_APP_ID, MicrosoftAppPassword: process.env.MS_BOT_CLIENT_SECRET, MicrosoftAppTenantId: process.env.MS_CLIENT_ID, }), ), ); await adapter.createConversationAsync( process.env.MS_BOT_APP_ID!, Channels.Msteams, "https://smba.trafficmanager.net/teams/", null, { activity: { type: "message", text: "This is a test message", textFormat: "markdown", }, bot: { id: `28:${process.env.MS_BOT_APP_ID}`, name: "Zygon" }, isGroup: true, tenantId: process.env.MS_TENANT_ID, channelData: { channel: { id: channelId } }, }, console.log, );166Views0likes8Comments