How to update Teams bot

Leniker Gomes 0 Reputation points
2024-02-14T10:07:11.0266667+00:00

Hi,

I'm developing a Microsoft Teams bot using Visual Studio (.NET) and Teams Toolkit.

When I first publish my Teams bot, it works fine (I am testing it using http triggers). I am following this process in Teams Toolkit:

  1. Prepare Teams App Dependencies
  2. Provision in the Cloud
  3. Deploy to the Cloud
  4. Open Teams Developer Portal to Publish

But whenever I update the source and increase the version in manifest.json, my bot does not send notifications using the same triggers (following the same process above to publish any update).
I have to uninstall the bot from my user and then install it again for it to be recognized (which I do not want to be doing manually).

Can you please help me with this?
Am I missing something?

Best regards,

Leniker Gomes

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,554 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,442 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Connor Little 5 Reputation points
    2024-12-22T17:43:36.4066667+00:00

    For those struggling with this issue:

    This is likely related to using local file storage for Conversation IDs. To resolve this you need to implement your own storage solution to persist these Conversation ID references. Once the endpoint restarts it forgets the Conversation, and the notifications aren't sent.

    Stack Overflow fix

    Microsoft Docs

    1 person found this answer helpful.

  2. Prasad-MSFT 7,511 Reputation points Microsoft Vendor
    2024-02-15T04:49:47.4333333+00:00

    When you make certain changes to your bot, such as modifying the bot ID or changing the bot's one-way notification configuration, existing users must accept another permission request to install the update. This could be the reason why your bot is not sending notifications after an update. You need to ensure that your users accept the new permission request when installing the updated version of your bot. Make sure you have made the necessary changes to your bot's source code and increased the version number in the manifest.json file. Publish the updated bot using the Teams Toolkit by following the process you mentioned: Prepare Teams App Dependencies, Provision in the Cloud, Deploy to the Cloud, and Open Teams Developer Portal to Publish. After publishing the updated bot, instruct your users to uninstall the existing version of the bot from their Teams client. Once the existing version is uninstalled, the users can install the updated version of the bot from the Teams App Store or by uploading the updated manifest file. When the users install the updated version, they will be prompted to accept the new permission request. They need to accept the request for the bot to function properly and send notifications.

    By following these steps, your users should be able to install the updated version of the bot and accept the new permission request without you having to manually uninstall and reinstall the bot for each user. Thanks,  Prasad Das *************************************************************************  If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.