Getting Refresh access token failed with status code: 400
Bot Info
- SDK Platform: Node.js
- SDK Version: 3.8.3
- Active Channels: Skype, Slack
- Deployment Environment: Own server
Issue Description
Suddenly getting the error on sending any message to my bot:
Refresh access token failed with status code: 400. Is there some authentication downtime on the botframework servers?
same here. Critical! No customer can use our bot right now SDK Platform: .Net SDK Version: 3.14.0 Active Channels: Directline
Same here:
- SDK Platform: NodeJS
- SDK Version 3.x
- Active Channel: Messenger, WebChat
- Deployed on Azure, Ubuntu 14 and 16
Facing the same issue for all our bots. Environment Info: Platform : Node Js Bot Builder SDK : 3.13.1 Deployment Environment : Azure Bot service (Web App)
Same here:
SDK Platform: .NET SDK Version 3.14.1.1 Active Channel: Telegram, WebChat, DirectLine Deployed on Azure
None of our customers can use any of our bots. This is very critical!
Same here.
We have started to receive this error in all of our three environments (Development, integration, production) 30 minutes ago. This issue happened a couple of times in the past:
https://github.com/Microsoft/Microsoft/BotBuilder#3197 https://github.com/Microsoft/Microsoft/BotBuilder#1938
Environment:
- SDK Language: Node
- SDK version: 3.7.0.
Using Facebook Messenger channel. This is what appears in the logs when I try to send a message: Message:
{"type":"message","agent":"botbuilder","source":"facebook","address":{"id":"mid.$cAAX3CT72CJBoy3pL_limjUDtdovY","channelId":"facebook","user":{"id":"1046304145498637","name":"Alberto De Vega"},"conversation":{"isGroup":false,"id":"1046304145498637-1678993359058347"},"bot":{"id":"1678993359058347","name":"botcorn-dev"},"serviceUrl":"https://facebook.botframework.com","useAuth":true},"text":"Hola! No sabía que estabas por aquí...","time":"2018-04-06T09:06:29.867Z","lvl":"INFO","msg":"Message OUT"}
ERROR:
{"time":"2018-04-06T09:06:30.084Z","lvl":"ERROR","err":{"message":"Refresh access token failed with status code: 400","name":"Error","constructor":"Error","stack":"Error: Refresh access token failed with status code: 400\n at Request._callback (/opt/botcorn/node_modules/botbuilder/lib/bots/ChatConnector.js:489:28)\n at Request.self.callback (/opt/botcorn/node_modules/request/request.js:186:22)\n at emitTwo (events.js:106:13)\n at Request.emit (events.js:191:7)\n at Request. (/opt/botcorn/node_modules/request/request.js:1163:10)\n at emitOne (events.js:96:13)\n at Request.emit (events.js:188:7)\n at IncomingMessage. (/opt/botcorn/node_modules/request/request.js:1085:12)\n at IncomingMessage.g (events.js:292:16)\n at emitNone (events.js:91:20)\n at IncomingMessage.emit (events.js:185:7)\n at endReadableNT (_stream_readable.js:974:12)\n at _combinedTickCallback (internal/process/next_tick.js:80:11)\n at process._tickDomainCallback (internal/process/next_tick.js:128:9)"},"msg":"Error: Refresh access token failed with status code: 400"}
** The same happens with demo-facebook example from botbuilder/node/examples/demo-Facebook, even when updated with the latest release from master (git pull - npm install - node app.js). Tested with FB Messenger and Web Chat Client from Azure Portal**
And when I try to request a token directy with a POST request following the documentation in https://blog.botframework.com/2017/06/19/Load-Testing-A-Bot/ I get this error:
{ "error": "unauthorized_client", "error_description": "AADSTS70001: Application with identifier '<MS_APP_ID>' was not found in the directory botframework.com\r\nTrace ID: d7ab57e9-6ea3-49b9-bf24-3d1616671800\r\nCorrelation ID: cfe8eb8e-cd19-4c63-bef5-d1a1d4ec0286\r\nTimestamp: 2018-04-06 09:42:17Z", "error_codes": [ 70001 ], "timestamp": "2018-04-06 09:42:17Z", "trace_id": "d7ab57e9-6ea3-49b9-bf24-3d1616671800", "correlation_id": "cfe8eb8e-cd19-4c63-bef5-d1a1d4ec0286" }
Same issue here.
Bots were properly working before, but they have been failing at least since one hour ago.
Bots are able to receive messages, but when the bot sends the message, it receives the error.
Beyond the Channels mentioned before, we have also experience the issue with Telegram, so it is not platform specific.
This is the error using Node.js SDK:
Error: Refresh access token failed with status code: 400
at Request._callback (node_modules/botbuilder/lib/bots/ChatConnector.js:582:24)
at Request.self.callback (node_modules/request/request.js:188:22)
at emitTwo (events.js:125:13)
at Request.emit (events.js:213:7)
at Request.<anonymous> (node_modules/request/request.js:1171:10)
at emitOne (events.js:115:13)
at Request.emit (events.js:210:7)
at IncomingMessage.<anonymous> (node_modules/request/request.js:1091:12)
at Object.onceWrapper (events.js:314:30)
at emitNone (events.js:110:20)
at IncomingMessage.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1047:12)
at _combinedTickCallback (internal/process/next_tick.js:102:11)
at process._tickCallback (internal/process/next_tick.js:161:9)
Seems that some of the Microsoft servers are down... Maybe this is the problem? see here
Facing the same issue for all our bots. Environment Info: Platform : C# Bot Builder SDK : 3.14.1 Deployment Environment : Azure Bot service (Web App)
The official status page does not show any error: https://azure.microsoft.com/en-us/status/
Seems to be a server issue: when I try to create a new Bot Channels Registration in Azure it fails with the following message:
One or more objects referenced by the access token were not found. Request ID: 95c85886-994a-435d-873e-90d8774f56e6, Timestamp: 04/06/2018 10:00:27
Please check that your account has sufficient access to the Microsoft App Registration Portal link below.
Open App Registration Portal Alternatively, use the "Create New" option in "Microsoft App ID and password" sub section to create a Microsoft App ID and password manually.
The App Registration Portal seems to have an issue as well: https://apps.dev.microsoft.com/portal/register-app
Same here: From last 2 hrs IST
SDK Platform: Node.js SDK Version ^3.14.1 Active Channel: WebChat, Skype, Facebook and Slack Deployed on other & Register with Bot service
our customers not able to use any of our bots.
Same here: From last one hour SDK Platform: NodeJS SDK Version: ^3.13.1, Active Channel: Directline
Same error is showing up on all of the bots
This issue has been observed on all Channels , not just Direct-line. There is also issue on azure portal , neither can create/Add any application nor can view any of the previous migrated applications .
Same here. We have started to receive this error in all of our environments (Development, Staging and Production):
SDK Platform: NodeJS SDK Version 3.x Active Channel: Messenger, Skype, MS Teams, Slack, WebChat Deployment Environment : Azure Bot service (Web App)
Error:
Error: Refresh access token failed with status code: 400
at new Error (native)
at Error.AppInsightsAsyncCorrelatedErrorWrapper (D:\home\site\wwwroot\node_modules\applicationinsights\out\AutoCollection\CorrelationContextManager.js:173:18) [<root>]
at Request._callback (D:\home\site\wwwroot\node_modules\botbuilder\lib\bots\ChatConnector.js:561:28) [<root>]
at Request.self.callback (D:\home\site\wwwroot\node_modules\request\request.js:186:22) [<root>]
at Zone.runTask (D:\home\site\wwwroot\node_modules\zone.js\dist\zone-node.js:151:47) [<root> => <root>]
at Request.ZoneTask.invoke (D:\home\site\wwwroot\node_modules\zone.js\dist\zone-node.js:345:33) [<root>]
at emitTwo (events.js:106:13) [<root>]
at Request.emit (events.js:191:7) [<root>]
at Request.<anonymous> (D:\home\site\wwwroot\node_modules\request\request.js:1163:10) [<root>]
at Zone.runTask (D:\home\site\wwwroot\node_modules\zone.js\dist\zone-node.js:151:47) [<root> => <root>]
at Request.ZoneTask.invoke (D:\home\site\wwwroot\node_modules\zone.js\dist\zone-node.js:345:33) [<root>]
at emitOne (events.js:96:13) [<root>]
at Request.emit (events.js:188:7) [<root>]
at IncomingMessage.<anonymous> (D:\home\site\wwwroot\node_modules\request\request.js:1085:12) [<root>]
at IncomingMessage.g (events.js:292:16) [<root>]
at Zone.runTask (D:\home\site\wwwroot\node_modules\zone.js\dist\zone-node.js:151:47) [<root> => <root>]
at IncomingMessage.ZoneTask.invoke (D:\home\site\wwwroot\node_modules\zone.js\dist\zone-node.js:345:33) [<root>]
at emitNone (events.js:91:20) [<root>]
at IncomingMessage.emit (events.js:185:7) [<root>]
at endReadableNT (_stream_readable.js:974:12) [<root>]
at Zone.runTask (D:\home\site\wwwroot\node_modules\zone.js\dist\zone-node.js:151:47) [<root> => <root>]
at ZoneTask.invoke (D:\home\site\wwwroot\node_modules\zone.js\dist\zone-node.js:345:33) [<root>]
at args.(anonymous function) (D:\home\site\wwwroot\node_modules\zone.js\dist\zone-node.js:1497:25) [<root>]
The official status page is now showing a Warning for Azure Active Directory that could be related: https://azure.microsoft.com/en-us/status/
Azure Management Portal - Authentication Errors - Investigating
An alert for Azure Active Directory is being investigated for East Asia.
Engineers are aware and are actively investigating.
Further updates will be available in 60 minutes.
Although our issue is happening in Europe and the warning only mentions East Asia.
Ok, the status page now acknowledges issues in East Asia and Europe. We will have to wait:
Azure Management Portal - Authentication Errors - Investigating
Starting at 08:30 UTC on 06 Apr 2018 a subset of customers using Azure Active Directory in East Asia
and Europe may experience difficulties when attempting to authenticate into resources which are
dependent on Azure Active Directory. Engineers are aware of this issue and are actively
investigating. The next update will be provided in 60 minutes, or as events warrant.
Aditionally, if I try to Access my Azure Portal, I get an error and I can see the following error:
Seems that Microsoft services are up and running again. At least our bot on all our environments are starting to reply again!
Yes! Working again!
Finally started again..! :)