Forum Discussion
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.
3 Replies
- Petri-XBronze Contributor
Hi Sayali-MSFT
I'm not sure if you got my issue. I do have already existing chatbot on our Teams and its secrets expired. When I'm looking for the chatbot using the developer Portal I can see the bot under the "tools" menu and here is also the place to renew the secret for the bot, and that works fine:
But the question is, where shall I add that the new client secret in next? If I review the bot from the "App Features" it shows all others, except the secrets:
When I create this at the first time, then I was able to define the bot and client secret. But where is the logic for renewing the secret? I hope the answer is: "you should setup new bot every time you update the client secrets" 🙂
- 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
- Sayali-MSFT
Microsoft
Hello Petri-X, Could you please confirm if your issue has resolved with provided suggestions or still looking for any help?
- Update Configuration in Bot Framework: