question

GauravHarode-5204 avatar image
0 Votes"
GauravHarode-5204 asked Sayali-MSFT-0291 commented

MS Teams Message Extension not working on test server[Cloud]

I have developed MS Teams Message Extension using Java[Spring Boot] and registered the bot in Botframework Development portal[https://dev.botframework.com/]. It is working fine in local. I tested in local environment using a tuenneling application named localtunnel. I tested the extension in MS Teams.

I pushed the code to cloud[AWS] as it was working fine on local and also changed the message endpoint url to point to our test server. But, unfortunately i am getting "<BotError> Bot returned unsuccessful status code unauthorized."[You can see the screenshot]. Test server message endpoint doesn't require JWT token, i am able to call it successfully from postman with out giving token.

As per the documentation, this error occurs usually when:

  • The Messaging endpoint specified on the Settings page for your bot in the Bot Framework Portal is incorrect. Make sure you have included the proper path at the end of the URL (e.g., /api/messages).

  • The Messaging endpoint specified on the Settings page for your bot in the Bot Framework Portal does not begin with https or is not trusted by the Bot Framework. Your bot must have a valid, chain-trusted certificate.

  • The bot is configured with missing or incorrect values for app ID or password. Verify that the bot configuration settings specify valid values for app ID and password.

All the points are correct in my case. I

In this documentation, It is mentioned about Azure Bot resources in the "Test your bot" section of "Step 4: Test your bot in the cloud".

https://docs.microsoft.com/en-us/azure/bot-service/bot-service-troubleshoot-authentication-problems?view=azure-bot-service-4.0&tabs=csharp#step-3

So in order to test the bot on cloud, is it necessary to register it on Azure Bot services instead of Botframework development portal? Can't we just test it just by registering it on Botframework development portal?

201598-message-extension-error.png


office-teams-app-dev
· 18
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @GauravHarode-5204,

The “office-teams-windows-itpro” tag is for general questions about Teams client. Since from the description, your question involves development , I’ll change the tag to “office-teams-app-dev” instead so that their community members can help look into it. Thanks for your understanding.

0 Votes 0 ·

@Sayali-MSFT-0291 Do I need to deploy my back end message extension app to Azure app service?

0 Votes 0 ·

@Sayali-MSFT-0291 I went through some docs, I see that it is not mandatory to deploy extension on azure, we can do non-azure deployment as well. It seems the portal dev.botframework.com is deprecated and is on the verge of removal.

I register my bot as an azure bot following this article https://docs.microsoft.com/en-us/azure/bot-service/abs-quickstart?view=azure-bot-service-4.0&tabs=userassigned .For local environment, it is working fine. For azure bot, I needed to provide two more properties MicrosoftAppType and MicrosoftAppTenantId along with MicrosoftAppId and MicrosoftAppPassword on my extension app.

If I update our extension app in cloud[AWS][Add MicrosoftAppType and MicrosoftAppTenantId] and change message endpoint of azure bot to point to our cloud extension endpoint, will it work?

0 Votes 0 ·

@GauravHarode-5204 - It will work but you need to handle all the requests at tour cloud extension side because it's a API call (/api/messages)Messaging endpoint.
Could you please try it once?

0 Votes 0 ·

@GauravHarode-5204 -did you get chance to check?

0 Votes 0 ·
Show more comments

0 Answers