UiPath / orchestrator-powershell

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

Get-UiPathAuthToken i.c.w. username/password does not work on Azure app service deployment #32

Closed Maarten-Nelissen closed 5 years ago

Maarten-Nelissen commented 5 years ago

I am trying to use the powershell library to connect to the orchestrator installed in an azure app service using username/password but this does not work (with any username).

The library is loaded correctly, I can view all commands using " Get-Command -Module UiPath.PowerShell".

Furthermore if I use -WindowsCredentials the command successfully finishes, but no token is supplied (which is logical because we do not use windows credentials).

The orchestrator is accessible from my PC and when I use the REST API to retrieve a Bearer token this works fine.

error:

Get-UiPathAuthToken : An error occurred while sending the request. At line:1 char:1

rusanu commented 5 years ago

Hello Maarten,

The libray will display more troubleshooting info if you change the environment variables like this:

PS C:\>$DebugPreference='Continue'
PS C:\>$VerbosePreference='Continue'

Also, just a shot in the dark, but can you also run this in the PowerShell session:

PS C:\>[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
PS C:\>Get-UiPathAuthToken ... 
Maarten-Nelissen commented 5 years ago

The shot in the dark works! Thanks a lot :)

On Fri, 21 Dec 2018 at 07:25, rusanu notifications@github.com wrote:

Hello Maarten,

The libray will display more troubleshooting info if you change the environment variables like this:

PS C:>$DebugPreference='Continue' PS C:>$VerbosePreference='Continue'

Also, just a shot in the dark, but can you also run this in the PowerShell session:

PS C:>[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls" PS C:>Get-UiPathAuthToken ...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/UiPath/orchestrator-powershell/issues/32#issuecomment-449273102, or mute the thread https://github.com/notifications/unsubscribe-auth/AWb8hxFeQltlM9SlMmcNt6nLdyFGg1c-ks5u7H7pgaJpZM4ZaAbO .