MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
281 stars 502 forks source link

Sending proactive message example fails (+fix) #11461

Open ChetanSharma-msft opened 1 month ago

ChetanSharma-msft commented 1 month ago

Steps to reproduce

Copied bug from: https://github.com/OfficeDev/teams-toolkit/issues/12206

Details from original post: Describe the bug This line fails with both in test tools and in Azure due to process.env.MicrosoftAppId being undefined

//await adapter.continueConversationAsync(process.env.MicrosoftAppId, confRef, async (context) => {

Changing to this line works at least on local. await adapter.continueConversationAsync( new ClaimsIdentity([], true), confRef, async (context) => { await context.sendActivity("proactive hello"); } );

Does this fix makes sense? Or do I need to change something else?

roee.oz<>microsoft.com

Expected behavior

Changing to this line works at least on local. await adapter.continueConversationAsync( new ClaimsIdentity([], true), confRef, async (context) => { await context.sendActivity("proactive hello"); } );

Actual behavior

This line fails with both in test tools and in Azure due to process.env.MicrosoftAppId being undefined

//await adapter.continueConversationAsync(process.env.MicrosoftAppId, confRef, async (context) => {

Error details

No response

microsoft-github-policy-service[bot] commented 1 month ago

Hi ChetanSharma-msft! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

sayali-MSFT commented 4 weeks ago

@roeeoz - Thanks for reporting your issue. Ensure that process.env.MicrosoftAppId and other necessary environment variables are correctly configured in both local and deployment environments. This involves setting environment variables in your development setup and Azure App Service.

Could you please check and confirm this?