Forum Discussion

Petri-X's avatar
Petri-X
Bronze Contributor
Apr 04, 2025

When the Bot's app secrets expires, how to fix. .

Hi,

Just realized that the secret was expired from one of our Teams chatbot. On the Developer portal, there was nice button "Add a secret" under Tools \ Bot Management.  And that was working fine, it adds the new secret and I was able to remove the expired.

The only question is, was this enough? Or should I do something extra steps to get the new secret into use? After few hours, that still not react to me.

  • Petri-X,

    Updating your bot's secret is a critical step for maintaining the functionality and security of your Teams chatbot. However, there might be additional steps required to ensure everything is seamless and your bot remains operational. Here are some steps and considerations after updating the secret:

    1. Update Configuration in Bot Framework:
      • Ensure that the new secret is updated in your bot's configuration files, typically where the bot's credentials are stored (e.g., .env or appsettings.json).
      • Example for .env file:MicrosoftAppId={Your_Application_Id}
      • MicrosoftAppPassword={Your_New_Secret}
    2. Regenerate Tokens:
      • If your bot is using access tokens generated using the old secret, you'll need to regenerate new tokens using the updated secret.
    3. Redeploy Bot:

Resources