We have an application that automates file movement.
We have the ability to run a PowerShell script after a successful file move.
I want this PowerShell script to create a Jira ticket. But since the File movement app is a windows service, there is no possibility of an interactive exchange with a user for a password. I researched, and anything i find does not work (errors)
$password = ConvertTo-SecureString "Magic$Password" -AsPlainText -Force
$Creds = New-Object System.Management.Automation.PSCredential ("Service.AccountName", $password)
...
New-JiraIssue @parameters -Credential $Creds
---error---
WARNING: JIRA returned HTTP error 401 - Unauthorized
ConvertFrom-Json2 : Exception calling "DeserializeObject" with "1" argument(s): "Invalid JSON primitive: ."