Symptom
- Desktop Agent is getting disconnected or not connecting with the below error message:
- "The registration failed because we couldn't get the access token from the tenant."
- In the events.json file, it is possible to see the following message:
- "dev": "We could not get the Access Token from the tenant. Registration failed."
- Technical traces show error messages such as:
- "msg":"StateMachine transition: REGISTER_START: the state machine has not changed (ERROR)"
- "msg":"Websocket error","data":"self signed certificate in certificate chain"
- "msg":"StateMachine transition: ERROR_IN_REGISTERING: the state machine has not changed (ERROR)"
Environment
- SAP Business ByDesign
- SAP Intelligent Robotic Process Automation
Reproducing the Issue
- Login to the Desktop Agent
- In the Home Screen, you can see Warning as "Connection lost, we are trying to reconnect"
- Navigate to the History
- Select the Agent Events
- Here you can see below error:
"The registration failed because we couldn't get the access token from the tenant."
Cause
The communication between the factory and the agent is done through the websocket protocol, the communication may be blocked by the customer security policy.
Resolution
Add "websocketChoice": "wsProxy" in the configuration file when Desktop Agent version is 3.19.56 or higher.
Follow below steps:
- Install Agent 3.19.56 or Higher
- Shutdown Agent
- Open the following folder: C:\Users\YourUser\AppData\Roaming\SAPDesktopAgent\Store
- Edit the file config.json, at the end of the file (just after the "isTenantCentralizationDone": true,) add the following line "websocketChoice": "wsProxy".
- Notice that the comma should be added after "isTenantCentralizationDone": true
See Also
3383006 - After Desktop Agent update you cannot activate Tenant domain
Keywords
Desktop agent, Version, The registration failed because we couldn't get the access token from the tenant, 3.19.56, Websocket, connection, token. , KBA , CA-ML-IPA , IPA , AP-ML-RPA-EXE , ByDesign - Robotics process Automation - Bots Execution , Problem
SAP Knowledge Base Article - Public