Hi there,
I am building this API call to build an export of Jira users
Here is part of the call from a get-Atlasusers function I created.
$results = @()
while ($true) {
$url = "https://$workspaceName/rest/api/3/users/search?startAt=$startAt&maxResults=$maxResults"
$result = Invoke-RestMethod -Uri $url -Headers $headers
I have a for each which loops through the results then creates a CSV of Atlassian ID, Name and email address, but I am getting null for email address.
I am calling my function here (a subset here)
$AT_users = Get-AtlassianUsers $token
$export = @()
foreach ($AT_user in $AT_users) {
try {
$export += [PSCustomObject]@{
Atlassian_ID = $AT_user.accountId
Name = $AT_user.displayName
email = $AT_user.emailAddress
I am not sure why I am getting results except for email address here?