Unable To Access Action Center Resources Due To CORS Error Policy

In a On-premise setup, how to access the Action Center URL, following the Orchestrator Upgrade to v 21.10 ?

Issue Description: After successfully logging in to Action Center, it is not possible to access the Actions facets of Action Center (URL: https://orchestrtorURL:port/actions).

The error message reads "You don't have permissions to view this page. If you have access to multiple Orchestrator tenants, try switching to another. Else, contact your system administrator for necessary permissions."

Resolution: When investigating it through the browser's Console and network traffic, the error triggered is as follows

"Access to XMLHttpRequest at https://https://{Action_Center_host}:{port_number}/actioncenterservice/feature/features/ActionApp; from origin ;https://{your-localhost_name}:{port_number}; has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No Access-Control-Allow-Origin header is present on the requested resource."

Before proceeding with applying this solution, it is needed to validate with the client that the upgrade and installation of Action Center is performed correctly as per the Action Center Installation documentation.

Ensure that the UiPath.Orchestrator.dll.config (located in the Orchestrator installation folder) contains the following key: <add key="AcceptedRootUrls" value="http://{your-localhost_name}:{port_number},https://{Action_Center_host}:{port_number}" />

Make sure no leading or trailing white spaces are present in the key. Also, confirm that the OPTIONS verb is allowed in IIS for the Orchestrator website.

  1. Navigate to IIS.
  2. Select UiPath Orchestrator from the Sites list.
  3. Double click Request Filtering to open the Request Filtering window.
  4. Make sure that OPTIONS is added in list of verbs. If not present, add it. After adding, an IIS reset is needed for the changes to take effect.

If everything is setup correctly as described above and the issue still persists, then the cause most likely resides in the registry key and the Action Center config files. Both of these host the value for Action Center URL and the value must be the same in both locations.

It is important to modify the config files in both the Actions and Processes folders.

Procedure to check the value in Registry Editor:

  1. Use regedit to access the Registry Editor on the machine/server where Orchestrator is installed
  2. Navigate to the following Key: Hkey_Local_Machine -> Software -> WOW6432Node -> UiPath -> UiPath Action Center -> Action_Center_URL

Procedure to check the config files:

  1. Navigate to the Action Center folder on the machine/server where Orchestrator was installed.
  2. For Actions facet, go to Action Center Folder -> Actions -> environments folder -> env.json
  3. For Processes facet, go to Action Center Folder -> Processes -> environments folder -> env.json
  4. Make sure that the "businessUserPortalProxyServiceUrl" is the same URL as the one the user is trying to access in their browser.
  5. The structure of the "businessUserPortalProxyServiceUrl" key should be: https://{orchestrator_url}:{port}/actioncenterservice. You find the orchestrator URL used in the first key in the env.json file > "idpUrl"

To fix the problem, ensure that the "businessUserPortalProxyServiceUrl" (in both Actions and Processes folders) is the same as the value of the registry key Action_Center_URL, including the port.

Therefore, if the link used to access Action Center is https://ExampleLink:8443 , then this should be the value in all the afore-mentioned locations, as exemplified below:

Registry Editor:

Env.json file

Following these changes, either

  1. Reset the IIS service on the machine/server where Orchestrator is installed (do this via PowerShell with the command "iis reset")
  2. If an IIS reset is not possible due to operational reasons, perform a website restart for the Action Center sites (Actions and Processes) from the IIS management console. Note that an IIS reset is still recommended, but can be done at a later moment, when possible