A previous employee setup scripts to create tickets on a schedule, he had set it up to use basic authentication but with that being depreciated and most of the scripting experience left the company with him, I am asking how to switch out the basic authentication piece of the scripts with the API token.
I've created an API token for the account used to create the tickets but I've been having trouble finding anything definitive on using the API token instead of the basic authentication with the small bit of scripting experience I have.
Any help would be appreciated. Examples of current setup below:
#Connect to Jira API
#===================
if ($Jira){
Write-Host "Logging into Jira API" -ForegroundColor Cyan
$Global:signinName = cat c:\scripts\JIRAadminuser.txt
$Global:pass = cat c:\scripts\JIRASec.pwd | convertto-securestring
$Global:cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $signinName, $pass
New-JiraSession -Credential $Global:cred
Dear @Aaron Jones ,
it is pretty simple. Following this document, you just have to replace the password value with the token value. But be sure to use the email as user name.
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.