Closed jeffadavidson closed 4 years ago
After investigating further, updating to from version 12.2.4 to 12.2.5 seems to have resolved the issue
see description of #391
Note: 12.2.4
to 12.2.5
should read 2.12.4
to 2.12.5
. https://www.powershellgallery.com/packages/JiraPS/2.12.5
Context
My team has encountered the same issue as #350 and #353 that was meant to be fixed by a documentation change in #387
Description
My team and I are writing scripts to interact with a cloud JIRA instance. The pattern we have been following was to create a JiraPs session at the beginning of our script using
New-JiraSession
. We are not usingRemove-JiraSession
and the end of our script as the documentation has it flagged as deprecated.Because we are connecting to a cloud JIRA instance we have each been using a Personal Access Token(PAT) to create a session, using our username and the PAT as a password. This was working fine for the last 2 weeks. As of this morning (Nov 28 2019 7:00am MST) I started getting the following error when using the
New-Session
functionthen over the next few hours, the same issue started happening to all my coworkers.
Steps To Reproduce
As of now we have not been able to reliably reproduce. Once it starts happening to a user it seems to keep happening. Below is the functions we are running
Expected behaviour is to get a valid JiraPS session. Actual behaviour is the error above
Possible Solution
Using the debug and verbose commands I was able to trace the code flow for a user experiencing the issue and a user not experiencing the issue.
User Without Issue:
User With Issue:
Issue
The main issue seems to be to be that for when reaching the
Invoking JiraMethod with $parameter
step. The working used calls the 'https://domain.atlassian.net/rest/api/2/myself' endpoint, while the non-working user calls 'https://domain.atlassian.net/rest/api/2/mypermissions'. I am unsure what causes this altered code flow.The my
mypermissions
endpoint has been altered in the last year to require apermissions
parameter. JiraPS is not providing this parameter, so the call fails.Suggested fix
A few possible ways to fix this:
New-JiraSession
code flow to not hit themypermissions
parameter
argument to my permissions