AtlassianPS / JiraPS

PowerShell module to interact with Atlassian JIRA
https://AtlassianPS.org/module/JiraPS
MIT License
321 stars 131 forks source link

All user actions on Jira cloud are reporting back "The 'accountId' query parameter needs to be provided" #421

Closed patrick-ryan1 closed 4 years ago

patrick-ryan1 commented 4 years ago

Description

Get-JiraUser, Add-JiraGroupMember are failing with message "The 'accountId' query parameter needs to be provided." accountId parameter seems to be required by /rest/api/2/user and these cmdlets only allow user name.

Steps To Reproduce

Run "Get-JiraUser -UserName """ as per Detailed examples -- this fails. Run Add-JiraGroupMember with valid $UserName - fails with same error

Expected behavior

If accountId is required, then accept it. When creating a user, we do have that data. $user = New-JiraUser -UserName $UserName -DisplayName $DisplayName -EmailAddress $Mail

$useraccount = $user.RestUrl.Split('=')[1]

Your Environment

Windows 10 Powershell 7


Get-Module JiraPS -ListAvailable | Select Name, Version
Get-Module JiraPS -ListAvailable | Select Name, Version

Name Version


JiraPS 2.14.3 JiraPS 2.13.0 JiraPS 2.12.5 JiraPS 2.12.3 JiraPS 2.12.0 JiraPS 2.10.3

$PSVersionTable $PSVersionTable

Name Value


PSVersion 7.0.2 PSEdition Core GitCommitId 7.0.2 OS Microsoft Windows 10.0.16299 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0

Possible Solution

Add "accountId" parameter and allow that to be passed.

lipkau commented 4 years ago

this is a duplicate of #411