Closed rschmidt2 closed 4 years ago
What are you using for credentials?
My login account and the token
please make sure you are using the latest version. I released a new version yesterday.
also: try using the email address instead of the username
Now I am getting this error with this code:
PS C:\WINDOWS\system32> Write-Host "Logging into Jira API" -ForegroundColor Cyan
$Global:signinName = cat c:\scripts\adminuser.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
Logging into Jira API
Invoke-JiraMethod : **The 'permissions' query parameter is required.**
At C:\Program Files\WindowsPowerShell\Modules\JiraPS\2.12.4\JiraPS.psm1:3890 char:19
+ $result = Invoke-JiraMethod @parameter
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidResult: (:) [Invoke-JiraMethod], RuntimeException
+ FullyQualifiedErrorId : InvalidResponse.Status400,Invoke-JiraMethod
you are not on the latest version of the module
update-module jiraps
import-module jiraps -force
version should be 2.12.5
THANKS!!!! That did it.
It was working and I am using the 2.12.5 version. I put in the email address and the token password. I get: PS C:\WINDOWS\system32> New-JiraSession -Credential (Get-Credential)
cmdlet Get-Credential at command pipeline position 1 Supply values for the following parameters: DEBUG: [Get-JiraConfigServer] ParameterSetName: __AllParameterSets DEBUG: [Get-JiraConfigServer] PSBoundParameters: Key Value
ErrorAction Stop
DEBUG: [New-JiraSession] ParameterSetName: __AllParameterSets DEBUG: [New-JiraSession] PSBoundParameters: Key Value
Credential System.Management.Automation.PSCredential
DEBUG: [Invoke-JiraMethod] ParameterSetName: __AllParameterSets DEBUG: [Invoke-JiraMethod] PSBoundParameters: Key Value
Credential System.Management.Automation.PSCredential Method Get Headers {} URI https://titanpro2.atlassian.net/rest/api/2/myself StoreSession True
Resolve-DefaultParameterValue : Cannot bind argument to parameter 'Reference' because it is null. At C:\Program Files\WindowsPowerShell\Modules\JiraPS\2.12.5\JiraPS.psm1:3215 char:78
+ CategoryInfo : InvalidData: (:)
[Resolve-DefaultParameterValue], ParameterBindingValidationException
+ FullyQualifiedErrorId :
ParameterArgumentValidationErrorNullNotAllowed,Resolve-DefaultParameterValue
Cannot index into a null array. At C:\Program Files\WindowsPowerShell\Modules\JiraPS\2.12.5\JiraPS.psm1:3222 char:9
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
You cannot call a method on a null-valued expression. At C:\Program Files\WindowsPowerShell\Modules\JiraPS\2.12.5\JiraPS.psm1:3266 char:13
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
DEBUG: [Test-ServerResponse] Investigating $InputObject.Headers['X-Seraph-LoginReason'] DEBUG: [New-JiraSession] Adding session result to existing module PrivateData
Any ideas?
[image: Titan-Pro-Logo_Email-Signature.png]
Randy Schmidt
IT and System Integration Manager, Titan Pro SCI
P: 641.231.8958
randalschmidt@titanprosci.com | www.titanprosci.com
On Wed, Nov 27, 2019 at 1:37 PM Oliver Lipkau notifications@github.com wrote:
you are not on the latest version of the module
update-module jirapsimport-module jiraps -force
version should be 2.12.5
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AtlassianPS/JiraPS/issues/389?email_source=notifications&email_token=ANQ4MGPE44ZD4346M5ZXIYDQV3D5ZA5CNFSM4JMIP2I2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFKRRQY#issuecomment-559225027, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQ4MGNIEVXEBNLWVELUWMTQV3D5ZANCNFSM4JMIP2IQ .
I am using these commands to test Jiraps:
All seems fine until the next step
Instytead of getting a session, I get:
I get the same error with simple commands like those below:
In working with Atlassian support, I was able to connect to the REST API with my ID and token for a password. So I know I have the right data. What am I doing wrong or is their a bug?