I have used the ‘Orchestrator HTTP Request’ activity to get the access token. I have put the token request into a jsonPayload. Then we used ‘HTTP Request’ activity and provided the access token which we obtained by the earlier activity, in OAuth2Token field and also provided the required API Endpoint.
But running the bot, we are getting the error saying “You are not authenticated” even though access taken is being provided.
ok i understood that you are using orchestrator Http request to authenticate with your orchestrator by sending parameters as json payload. i assume that you are successfully authenticated with orchestrator and received token.
Now you are using normal http request activity using some orchestrator services by passing your bearer token. is my understanding correct.
In this case while using http request activity select authentication none and pass the below parameters as parameters not in the json body directly. please try and let us know. thanks
X-UIPATH-TenantName → your orchestrator tenant name
Authorization → Bearer + Your token
FYI,
I am using the API ( /odata/AuditLogs/UiPath.Server.Configuration.oData.Reports ) for downloading the audit report . All other api s were working fine but using this api still showing the same error saying "You are not authenticated "
I believe if you are using HTTP Request activity then you have to pass the cloud url as mentioned in the documentation, also you need to get the access token
If you are using Orchestrator HTTP Request then no need of cloud url and access token to generate, because it is already connected to orchestrator
Hi @Mattapalli_Kiran,
I could get the audit report without any issues. Can you please check whether you have tried it the below way?
Get access token with “HTTP Request” activity, deserialize and assign the token to a variable (eg: access_token). Make sure you are using Client_ID and User_Key to authenticate in Studio if it’s cloud orchestrator.
Use the same activity for the API calls.
Method: GET
End point : “https://cloud.uipath.com/<account_name/<tenant_name>/odata/AuditLogs/UiPath.Server.Configuration.OData.Reports”
Body format : application/json
Headers: as below