Does anyone have a existing way to do the API call 'Get Users in Organization' via powershell? I tried JiraPS but that can only give me group members and its just their name where as this gives ID, timezone and email etc.
Otherwise does someone have an idea how to connect? Seems to be totally different to how i connect to insight in my InsightPS module.
Community moderators have prevented the ability to post new answers.
$username = "email address"
$password = "api key"
$ServiceDeskID = "Service Desk Number"
$Server = "jira server url"
# Convert the username + password into a Base64 encoded hash for basic authentication
$pair = "${username}:${password}"
$bytes = [System.Text.Encoding]::ASCII.GetBytes($pair)
$base64 = [System.Convert]::ToBase64String($bytes)
$headers = @{ Authorization = "Basic $base64" }
$headers.Add('content-type' , 'application/json')
$headers.Add('X-ExperimentalApi' , 'opt-in')
$start = 0
$limit = 50 #Max results
$Customers = @()
$Customers = do {
$URL = [System.UriBuilder]"$Server/rest/servicedeskapi/servicedesk/$ServiceDeskID/customer?limit=$limit&start=$start"
$Response = Invoke-RestMethod -Uri $URL.Uri -Headers $headers -Method GET
$Response.values
$start += $limit
} until (
$Response.isLastPage -eq $true)
My issue was just with that API call. Seems to be fine for all others and turns out that wasn't what i wanted anyway.
very good script I was able to make this work to export all users from a datacenter instance, this is awesome! Thanks Gary!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
All the examples that I can find use Basic auth which doesn't work anymore.
Do we need to generate a JWT header or can we just provide username\APIkey?
Any help to point me in the right direction would be helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Recommended Learning For You
Level up your skills with Atlassian learning
Learning Path
Get the most out of Jira Service Management
Solve customer problems efficiently and deliver outstanding service experiences.
Learning Path
Adopt ITSM practices to deliver exceptional service
Become familiar with the principles and practices that drive ITSM. Then, learn how to configure and use Jira Service Management to implement them.
Atlassian Certified Associate
Jira Service Management Agent Essentials certification
Prove you know what's essential to providing efficient and resolution-focused service in Jira Service Management.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.