Reputation: 1
At my company we have a teams bot that helps employees view data. The bot worked without issues since our company moved. In the Azure App Service Logs it says that the provided client secret key for app 'eded587c-bc97-4b72-ba2f-1d764ddd6507' are expired. Since the move, most likely an app registration has not been taken over. The old app registration cannot be found anywhere.
2022-03-07T10:40:53.236015229Z ---> (Inner Exception #1) Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: AADSTS7000222: The provided client secret keys for app 'eded587c-bc97-4b72-ba2f-1d764ddd6507' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. 2022-03-07T10:40:53.236020230Z Trace ID: 3ce3450b-82ab-4fb2-bdcf-f6a6ce454400 2022-03-07T10:40:53.236024330Z Correlation ID: ac44eaf3-0b8b-4f2d-9253-cdc97d6bb529 2022-03-07T10:40:53.236028430Z Timestamp: 2022-03-07 10:40:49Z 2022-03-07T10:40:53.236032331Z ---> Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: Response status code does not indicate success: 401 (Unauthorized). 2022-03-07T10:40:53.236036731Z at Microsoft.Identity.Core.OAuth2.OAuthClient.GetResponseAsync[T](Boolean respondToDeviceAuthChallenge) 2022-03-07T10:40:53.236040931Z ErrorCode: Unauthorized 2022-03-07T10:40:53.236048232Z StatusCode: 401 2022-03-07T10:40:53.236052432Z --- End of inner exception stack trace --- 2022-03-07T10:40:53.236056532Z at Microsoft.Identity.Core.OAuth2.OAuthClient.GetResponseAsync[T](Boolean respondToDeviceAuthChallenge) 2022-03-07T10:40:53.236060733Z at Microsoft.Identity.Core.OAuth2.OAuthClient.GetResponseAsyncT 2022-03-07T10:40:53.236064733Z at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.SendHttpMessageAsync(IRequestParameters requestParameters) 2022-03-07T10:40:53.236069033Z at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.SendTokenRequestAsync() 2022-03-07T10:40:53.236073234Z at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.CheckAndAcquireTokenUsingBrokerAsync() 2022-03-07T10:40:53.236077334Z at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.RunAsync() 2022-03-07T10:40:53.236081534Z at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.AcquireTokenForClientCommonAsync(String resource, ClientKey clientKey) 2022-03-07T10:40:53.236085935Z at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.AcquireTokenAsync(String resource, ClientCredential clientCredential) 2022-03-07T10:40:53.236090235Z at Microsoft.Bot.Connector.Authentication.AdalAuthenticator.AcquireTokenAsync(Boolean forceRefresh) 2022-03-07T10:40:53.236094335Z at Microsoft.Bot.Connector.Authentication.Retry.Run[TResult](Func
1 task, Func
3 retryExceptionHandler) 2022-03-07T10:40:53.236098536Z ErrorCode: invalid_client 2022-03-07T10:40:53.236102536Z StatusCode: 401<--- 2022-03-07T10:40:53.236106536Z
So we have made a new app registration and a new Azure App Service.
In App Studio we set up the bot with the app id from the app registration.
Here is also the App Manifest from the App Studio.
With the bot emulator I get a response from the bot, but the bot emulator is used locally. What is the reason that the bot does not respond to teams, is there something I'm missing. I have not created the bot and do not know if this information can help you. If you need more info please let me know.
Upvotes: 0
Views: 154
Reputation: 10804
It's great that you've recreated the app registration in Azure, but the whole point of the Secret is to secure the communication between your bot and the Bot Framework services. As a result, the bot code itself requires that info (the app ID and the app secret). They're most likely still using the old one. It's probably in the config for the Azure App Service - check the "Configuration" section for that resource.
You can even see this from the error message - it's complaining about the secret for app "eded587c-bc97-4b72-ba2f-1d764ddd6507", but your new App's ID is 'bb692...'.
Upvotes: 1