Get queue item activity returns an error with message "Operation returned an invalid status code 'Forbidden'"

The detailed exception message is:


An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
Microsoft.Rest.HttpOperationException: Operation returned an invalid status code ‘Forbidden’
at UiPath.Core.Activities.TaskExtensions.ThrowIfNeeded(Task task, Boolean suppresThrowException)
at UiPath.Core.Activities.Orchestrator.BaseOrchestratorClientActivity.ThrowIfNeeded(AsyncCodeActivityContext ctx, Task task, Boolean suppresThrowException)
at UiPath.Core.Activities.Orchestrator.BaseOrchestratorClientActivity1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity1.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

`
I am unable to access assets as well with the same error code. For other users on the same orchestrator, they can access the queues and the assets properly.

I tried changing the robot roles as well but it didnt work.

I created this simple sequence to fetch an asset from orchestrator but it returned an OrchestratorHttpException.

The full exception message is as follows:
`
~
Source: Get Asset

Message: You are not authorized! Error code: 0

Exception Type: UiPath.Core.Activities.OrchestratorHttpException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
UiPath.Core.Activities.OrchestratorHttpException: You are not authorized! Error code: 0
at UiPath.Core.Activities.HttpStatusCodeExtension.OrchestratorEnsureStatusCode(HttpResponseMessage response)
at UiPath.Core.Activities.BaseAssetActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

~
~
~
The robot is not able to access any queues or assets from the orchestrator. Any ideas on how to solve this issue?

Hi @ranjan_harsh

Welcome to the community!

A silly question, are you connected to Orchestrator? Because these activities would only work while you are connected to Orchestrator.

Also, make sure you have appropriate roles in the same.
Thanks,
Prankur

3 Likes

@PrankurJoshi
I am connected to orchestrator. I already checked that.
I even checked the robot roles. they seem fine.

Thanks,
Harsh Ranjan

1 Like

Even I am getting the same error. Can anyone help me here

I did not find the solution any where here @PrankurJoshi @ranjan_harsh

The error below is

"RemoteException wrapping UiPath.Core.Activities.OrchestratorHttpException: You are not authenticated! Error code: 0
at UiPath.Core.Activities.HttpStatusCodeExtension.OrchestratorEnsureStatusCode(HttpResponseMessage response)
at UiPath.Core.Activities.BaseQueueActivity.EndExecute(NativeActivityContext context, IAsyncResult result)
at UiPath.Core.Activities.AsyncNativeActivity.BookmarkResumptionCallback(NativeActivityContext context, Bookmark bookmark, Object value)
at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value)
at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

@NikhilRPA It seems that you are not connected to Orchestrator or if you had before the authentication is failed now, can you please confirm that?

1 Like

Hi @PrankurJoshi I have connected to orchestrator. As I mentioned the status shows available and connected. I am using community edition.
I did not face this problem before and I am able to fetch the records and use the assets from orchestrator.

No problem please share a screenshot with properties tab. Also try to delete and re-drag the activity and re-create the variables and try.

Hi - Please check if the robot role has permissions to access the Asset. Yu can follow below steps to check :

  • Login to Orchestrator
  • Go to Roles (If you are using cloud.uipath.com then you will find it under “Tenant” )
  • Edit role Robot
  • Go to Folder Permission and check View permission for Asset.

If this does not help then please check the roles assigned to your robot and set the same permission for that role.

1 Like