Running Get-JiraUser -Username 'MyUsername' | FL * returns a user object with Groups property holding a list of all groups to which a user belongs.
However, running Get-JiraUser returns only the current user; but the Groups property is empty.
Steps To Reproduce
'With Explicit Username'
Get-JiraUser -Username $cred.Username | Select-Object -ExpandProperty Groups
'With No Username (defaults to current user)'
Get-JiraUser | Select-Object -ExpandProperty Groups
Expected behavior
A list of the groups to which the user belongs should be returned
Description
Running
Get-JiraUser -Username 'MyUsername' | FL *
returns a user object withGroups
property holding a list of all groups to which a user belongs.However, running
Get-JiraUser
returns only the current user; but theGroups
property is empty.Steps To Reproduce
Expected behavior
A list of the groups to which the user belongs should be returned
Your Environment
Possible Solution
Instead of using
$selfResourceUri
use the$searchResourceUri
URI, passing the current session credentials' username value to the Username parameter.