I am using get jobs activity but got error Get Jobs: You are not authorized! Error code: 0

I am using get jobs activity but got error Get Jobs: You are not authorized! Error code: 0

Hi @Muhammad_Imran_Hashmi

Can you confirm if you have the correct permissions to view/edit the jobs in Orchestrator from the account you are running the bot with? And that you have access to the folder where the job is being processed?

Thanks :slight_smile:

YES i THINK SO BUT HOW i CHECK

You can simply open Orchestrator and then do the following:

Tenant → Folders → {Your Folder} → Manage Access | and then confirm that your name is shown in the table:

That’s for folder access. Then for the correct permission to view jobs, you can simply click on the 3 dots next to your username (same section as in screenshot) and then select “Edit role in this folder”. Once selected, make sure you see “Folder Administrator” in the Roles section:

Let me know if this helps.

@Muhammad_Imran_Hashmi

Are you using orchestrator http request?

Are you trying to get the jobs from a differnet folder?

Can you show how you implemented a screenshot would help

Cheers

So basically, what I am doing is that I have an Excel file in which I have different folder names in which different processes run. I use a get job activity and get jobs only for the faluted status

@Muhammad_Imran_Hashmi Could you check below checkpoints:

  1. Check Orchestrator Connection
    Go to UiPath Assistant
    Click on profile → Sign out
    Sign in again with correct Orchestrator URL + Machine Key / Sign-in
  2. Check Robot Permissions

In Orchestrator → Tenant → Manage Access → Roles
Make sure your user/robot has:

-View Jobs
-View Processes
-View Environments / Folders
3. Check Folder (Very Important)
Make sure your process is in the same folder
In Studio → Orchestrator panel → confirm correct folder selected
4. Check Machine & Runtime
Go to Orchestrator → Machines
Ensure:
Machine is connected
Runtime is available (not 0)

@Muhammad_Imran_Hashmi

The robot user from which you are running this process should be added to all the folders its trying to access…if it does not have access to any folder it would throw this error

cheers

How do I do that? Could you guide me?

Alternatively, the one other thing is the spelling of the folder in that Excel file (case sensitive).

Perhaps write a log message of the folder name before you get the job information and confirm that it is 100% the same as in Orchestrator.

  1. Access/Permissions → (Refer to my first message with screenshot on how to check permissions of person/robot account)
  2. Spelling (Case sensitive) folder names

@Muhammad_Imran_Hashmi

check the user from the jobs menu…and add the user to all the folders from the folder access menu

cheers

Try to upgrade the UiPath.System.Activities package to a more recent version, as the very old versions are not fully compatible with the updated Orchestrator API or backend resources.

Thanks, this solution works