Get Jobs activity gives You are not authorized! Error code: 0

Hi there,

I’m trying to fetch information on running and failed jobs with a robot so we could use it to automaticaly inform our users.

I can fetch the information using API calls but I noticed there is an activity in UiPath that seems to do the same thing but looks easier to use and maintain. But when using the “get jobs” activity I get the following error:

Get Jobs: You are not authorized! Error code: 0

my configuration for the get jobs activity:

I can use the activities for assets and for queues so my connection to orchestrator is fine.

When using the the API I use the UiPath.Web.Activities.HttpClient activity with as url:
“hosturl/odata/Jobs?$filter=State eq ‘Running’” and a bearer (created with a request with my credentials) in the header. This works so I assume I do have the permissions to query the jobs.

Has anyone an idea of why I can’t use the get jobs activity?

Hey! Can you send a picture in which the activity can be seen?
Have you tried upgrading/downgrading the package to see if it does the job?

Does the same issue occur if you try with a different folder? Is the Default folder a Modern or Classic folder? And lastly what’s the version of UiPath.system.activities in your robot project?

currently we have only one folder setup so I can’t try a different one. (I checked with the get asset activity, there we use the same parameter)

What do you mean by Modern or Classic folder?

I’m using version 22.4.4

maybe also relevant: our version of orchestrator is somewhat behind. We are still using 2020.10.1

There is not much to see, it’s just one activity
afbeelding

I tried downgrading to UiPath.System.Activities 21.10.4. The error message changed to Get Jobs: Operation returned an invalid status code ‘Forbidden’

I was only asking because I have a version that allows some input

image

Is your Studio/Assistant connected to Orchestrator? When I click on “Orchestrator Folder Path” on the screenshot that I sent you, I can see a list of all the folders that belong to my OC. By this, I can know for sure that the connection is right. I’m using System Activities 22.10.05. Maybe you do the same just to make sure on that side

Does the account that you’re using to sign into Studio have View permissions on Jobs?

@Jseg

Welcome to the community

Can you try removing the folder value please…that is supported only in modern

As your orch is 2020.x the folders would be classic

Hope this helps

Cheers

I removed the folder path parameter but I get the same error.

@Jseg

First please tr matching the system package version with the orchestrator version and then try

Cheers