Unable to execute Orchestrator powershell command

Hi

i am trying to authenticate to a tenant using power shell with windows credentials. I am unable to pass tenant name as parameter though the documentation in the power shell says it can be done that way .
command response

Get-UiPathAuthToken -URL orchestratorurl -WindowsCredentials -TenantName tenantname -Session

Get-UiPathAuthToken : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:1

  • Get-UiPathAuthToken -URL orchestratorurl -Win …
  •   + CategoryInfo          : InvalidArgument: (:) [Get-UiPathAuthToken], ParameterBindingException
      + FullyQualifiedErrorId : AmbiguousParameterSet,UiPath.PowerShell.Cmdlets.GetAuthToken
    
    
    

what am i doing wrong ? It works perfectly fine if tenant name is not provided.

Hi @vishnuvarthanp did you figure this out… I’m running into the same issue.

The ‘-TenantName’ parameter does not work when using Get-UiPathAuthToken in conjunction with the ‘-WindowsCredentials’ parameter. As to why this is the case, I am not sure. Here is the entry from the help documentation pertaining to the syntax using the ‘-WindowsCredentials’ parameter (note that the ‘-TenantName’ parameter is excluded):

Get-UiPathAuthToken [-URL] <string> -WindowsCredentials [-OrganizationUnit <string>] [-FolderPath <string>] [-Session]
    [-RequestTimeout <int>] [<CommonParameters>]

Hope this helps to clarify. But, would be nice if this could be resolved…