Hello,
I recently lost the ability to login to the Jira REST API using powershell, constantly getting 401 unauthorized errors. My account has admin privileges and I know I'm using the correct password. Anyone might know what I'm doing wrong?
Invoke-RestMethod -UseBasicParsing -Method Post -Uri "https://15sof1.atlassian.net/rest/auth/1/session" -SessionVariable session -Body (@{username = $username; password = $password} | convertTo-Json -Compress) -ContentType 'application/json'
Invoke-RestMethod : The remote server returned an error: (401) Unauthorized.
At line:1 char:1
+ Invoke-RestMethod -UseBasicParsing -Method Post -Uri "https://15sof1. ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Thanks!