Forum Discussion
Petri-X
Apr 04, 2025Bronze Contributor
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.
- Sayali-MSFT
Microsoft
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:
- 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}
- 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.
- Redeploy Bot:
- After updating the configuration, you may need to redeploy your bot application to ensure the new secret is in use.
- Deploy using Azure CLI or Azure portal ensuring you reflect the updated credentials in your deployment configuration.
Reference Document-
1. Enable SSO with Microsoft Entra ID - Teams | Microsoft Learn
2. Register a Bot Framework bot with Azure - Bot Service | Microsoft Learn
- Update Configuration in Bot Framework: