SAP Knowledge Base Article - Public

3401479 - Error Message:"The registration failed because we couldn't get the access token from the tenant."

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."

Environment

  • SAP Business ByDesign
  • SAP Intelligent Robotic Process Automation 

Reproducing the Issue

  1. Login to the Desktop Agent
  2. In the Home Screen, you can see Warning as "Connection lost, we are trying to reconnect"
  3. Navigate to the History
  4. Select the Agent Events
  5. Here you can see below error:

"The registration failed because we couldn't get the access token from the tenant."

Cause

The cause for this behavior is Desktop Agent version will be 3.19.56 or higher.

Resolution

You need to add "websocketChoice": "wsProxy" in the config file when desktop agent version is 3.19.56 or higher.

Follow below steps:

  1. Install the Agent 3.19.56 or Higher
  2. Shutdown your Agent
  3. Open the following folder C:\Users\YourUser\AppData\Roaming\SAPDesktopAgent\Store
  4. Edit the file config.json, at the end of the file (just after the "isTenantCentralizationDone": true,) add the following line "websocketChoice": "wsProxy"
    Please noticed, comma should be added after "isTenantCentralizationDone": true

After modifying the config file if you are still facing the same issue, please create a case by providing agent traces.

Steps for Agent traces :

  • Open your BPA Factory
  • Go to Agent List
  • Search for the Agent which you are facing issue
  • Select the Agent
  • In the next page, select on the sub menu called "Trace Reports"
  • You will see on the right a button called "Import Traces"
  • Select & Import the files 
  • In the item list you should see the a log file that you can download and provide as attachment in the case

Keywords

Desktop agent, Version, The registration failed because we couldn't get the access token from the tenant, 3.19.56 , KBA , AP-ML-RPA-EXE , ByDesign - Robotics process Automation - Bots Execution , CA-ML-IPA , IPA , Problem

Product

SAP Business ByDesign all versions