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

2 Likes

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

Thanks,
Harsh Ranjan