How do you format a REST call with CredentialTarget?

credential

#1

How do you properly format a REST call using the CredentialTarget parameter identified here?

I’ve been able to successfully call the robot passing User/Password. But I cannot seem to figure out how to call it passing a CredentialTarget?


#2

Hey @Scott

Here Credential Target is The username defined in the Windows Vault Manager/ Credential Manager.

CredentialTarget - The name of a Windows Credential that defines the user account that should execute the process.

Let me know the result of it.

Regards…!!
Aksh


#3

Hi Thanks…

Can you show me how the JSON is formatted?
I cannot get it to accept a call unless I actually use a format like:

{
‘WorkflowFile’: ‘C:\main.xaml’,
‘User’: 'myusername,
‘Password’: ‘mypassword’,
‘Type’: 0,
‘InputArguments’: {
‘stringData’: ‘mydata’
}
}

What does it look like if I specify a credential target instead?

Thank you!


#4

Hey @Scott

{
‘WorkflowFile’: ‘C:\main.xaml’,
‘User’: ‘’,
‘Password’: ‘’,
‘CredentialTarge’:<your credential user name>
‘Type’: 0,
‘InputArguments’: {
‘stringData’: ‘mydata’
}

Regards…!!
Aksh


#5

Thanks, I will give it a try.
One more kind of random question… so you’ll know what I am trying to do.
Trying to demo remote execution of a bot.
The problem I have been having is that the REST call “logs in” and shuts down the Remote Desktop Connection I have to the server running the bot.
I’m trying to show the REST invocation and the bot running remotely.
You think this will still cause the RDC session to drop?

Cheers.


#6

Hi,

I tried running with Credential Target in above format, but it gave below error.

{“message”:"StartJob : mscorlib, \n System.AggregateException: One or more errors occurred. —> System.Exception: Password or Credential must be specified. Job’s username {0}, Windows Identity {1}\r\n at UiPath.Service.Impl.CredentialStore.ValidateAuthentication(UserIdentity identity)

Is the Parameter name changed to other name in new version, because it seems it is not recognizing that windows credentials have to be used?

Thanks,
Eesh Tyagi


#7

Have you added the credential into the windows credential manager and used that credential name here?

according to this error you have not specified so you are getting this and other thing if you are using credentialTarget property then you don’t have to specify username and pasword property.

Regards…!!
Aksh


#8

For your information : @Scott @Eesh_Tyagi

Regards…!!
Aksh


#9

Aksh ~

Am I reading that correctly? You’re not going to support a REST endpoint anymore?
Please clarify.

Thank you,
Scott


#10

Not me :slight_smile: Uipath Team.

@badita will confirm more on this.

Regards…!!
Aksh


#11

Our focus is Orchestrator API.

You can try it as is in CE

  • uncomment the http binding line in app settings (it will be overriden at the next update)
  • run the robot with elevated rights

#12

Hi,

So its not CredentialTarget , it should be Credential. And we have to specify ‘User’ field also.

But again after running below command it gives access denied error.

{'WorkflowFile': '<XAML file name>','User':'EESH','Credential':'LAPTOP-464AVEER','Type': 0}

Error is

 {"message":"Executor start process failed, reason Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"}

So i am guessing since the UIRobot svc is running in say user X which is my local system account, it will not allow another credential say User Y in non windows server. But might be possible in VM or Windows server. May be @badita can correct this statement if i am wrong.


#13

Hey @Eesh_Tyagi

You are targeting the Users credential into the windows credential manager so it is appropriate field and most important depends on the API developer and parameters they have taken.

You have to read all things here first, Your some doubts will be clarify easily.

Regards…!!
Aksh


#14

I don’t know this area. Maybe @andraciorici or @Lavinia :slight_smile:
Anyway we have cut REST API support for this reason…to complicated.


#15

@aksh1yadav i have already gone through that article :slight_smile:. But with CredentialTarget it gives the error mentioned intially.

And also i have added windows credentials in manager and also tried with using only credentialTarget property removing username and password.

With the above method(using credential paramater), i understand that the API parameter mentioned is credentialTarget, but i tried using credential which gave an Job ID in POSTMAN API client.


#16

Hey @Eesh_Tyagi

Ahhan… seems to be the things has been changed. i have to check on this otherwise waiting for the latest updates from @Lavinia and @andraciorici

Thanks for noticing and updating me as well :slight_smile: :thumbsup:

Regards…!!
Aksh


#17

Hi all,

The credential target represents the target name of a credential defined in Windows Credential Store. This credential will be retrieved by UiRobot service and used for auto-login and workflow execution.

Not sure if you are aware, but a user can read credentials only from its Windows Credential Store. Because of this, the credential must be saved in Local System’s credential store. This way, UiRobotSvc is able to retrieve it and use it.

Regarding the other questions, the name of the parameter is CredentialTarget not credential. And yes, username must be specified as well and it must match the user set in the credential stored in Windows Credential Store.

As @badita said, this API can be used, but is no longer maintained.


#18

Hey @Eesh_Tyagi

As @andraciorici now confirmed :slight_smile: still things are same :stuck_out_tongue:

Same as what i said :slight_smile: :blush: :nerd:

Regards…!!
Aksh