UiPath / orchestrator-powershell

UiPath Orchestrator PowerShell cmdlet library
MIT License
106 stars 56 forks source link

Get-UiPathAuthToken with CloudCodeSet or CloudInteractiveSet #71

Closed nikhilbidwai closed 4 years ago

nikhilbidwai commented 4 years ago

Can you please add example of using Get-UiPathAuthToken CloudCodeSet or CloudInteractiveSet? I am trying to user this cmdlet for username/password with cloud orchasterator but it's not working so trying to see if it can work with CloudCodeSet or CloudInteractiveSet somehow?

rusanu commented 4 years ago

If you simply run Get-UiPathAuthToken it will run the interactive Cloud login.

nikhilbidwai commented 4 years ago

Thanks @rusanu, it worked! Do you happen to know if UiPath Jenkins plugin also uses Cloud login? because my deploy job is failing because plugin is not able to login using username/password looks like Cloud doesnt support basic username password anymore. wanted to know if there is anyway in plugin to use this cloud login flavor of Get-UiPathAuthToken.

rusanu commented 4 years ago

Cloud does not support user/password, so it cannot be used in automated environments, including Jenkins. The Cloud team is working to add application IDs support.

zulfikar2 commented 4 years ago

The cloud has the access token to use the API clouds. I noticed there was AuthToken parameter on the Add-QueueItem, however when i pass in my access code it gives a cannot convert "System.String" to type "UiPath.PowerShell.Models.AuthToken". How do I pass in my AuthToken to have it be valid?

rusanu commented 4 years ago

@zulfikar2 nearly all cmdlets accept an -AuthToken parameter, you should pass the output of Get-UiPathAuthToken:

ps:\>$token = Get-UiPathAuthToken ...
ps:\>Get-UiPathRobots -AuthToken $token

The -Session param of the Get-UiPathAuthToken is just convenience to avoid passing the same token to each cmdlet.