Orchestrator API Not Working In Orchestrator v2021.10.x Hosted On Azure PAAS

For UiPath Orchestrator v2021.10.x hosted on Azure PAAS, why does the Authentication for Orchestrator API not work and the error "You are not authenticated!" encountered?

Issue Description: For UiPath Orchestrator v2021.10.x hosted on Azure PAAS, the authentication for Orchestrator API does not work. The error "You are not authenticated" is encountered during Authentication.

The bearer token is successfully generated. However, using the same bearer token in subsequent API calls leads to the error "You are not authenticated"! The detailed error message is as follows:

Error Message: {

"message": "You are not authenticated!",

"errorCode": 0,

"result": null,

"targetUrl": null,

"success": false,

"error": {

"code": 0,

"message": "You are not authenticated!",

"details": "You should be authenticated (sign in) in order to perform this operation.",

"validationErrors": null

},

"unAuthorizedRequest": true,

"__abp": true

}


This observed behavior is due to a missing parameter for Orchestrator v2021.10.x, when hosted in Azure PAAS. In Application settings (Settings > Configuration > Application Settings) for the Orchestrator App service, a reference to the 'IdentityServer.OAuth.Enabled' parameter is missing.

Resolution: The missing parameter IdentityServer.OAuth.Enabled needs to be added in Settings > Configurations > Application Settingsfor the App Service for UiPath Orchestrator. This can be done in one of the two ways outlined below:

  1. In Azure Portal, navigate to the App service for UiPath Orchestrator > Configuration in Settings > Click on New Application Setting > Provide the below values for the name, value, and source:
image.png
  1. Click on 'Advanced Edit' > Displayed as a file > Add the below configuration manually > Click on OK

{

"name": "IdentityServer.OAuth.Enabled",

"value": "true",

"slotSetting": false

},