PS C:\WINDOWS\system32> New-JiraSession -Credential $cred
WARNING: JIRA returned HTTP error 401 - Unauthorized
I have tried using username, email account, Atlassian password and API token. All fail.
I was getting:
ARNING: JIRA returned HTTP error -
You cannot call a method on a null-valued expression.
At C:\Program Files\WindowsPowerShell\Modules\PSJira\1.2.5.251\Public\New-JiraSession.ps1:92 char:13
+ $readStream = New-Object -TypeName System.IO.StreamReader ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
And then I saw someone got further by using:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
And now I only get:
WARNING: JIRA returned HTTP error 401 - Unauthorized
I see may articles about deprecating basic authentication. But using the token for the password is not helping.