User Management using Rest


my current goal is to manage part of the userbase using the rest api with data from another application.
Creating Users, putting them into Groups, enabling/disabling them and creating the corresponding Groups.
Few things work currently, like list all active users, list users in specific groups and list all groups,…

What currently doesnt work

  • Create active users: even when adding ““active””:true into the json body. The Response always says “active”:false.
  • Find inactive users:
    only return active users

Searching directly for the key or accountId doesnt work either.
provide no results.

Using the people search i can partly find my created test users but not all of them. If i try to create a user with the same mail address or username like a test user i created before, even if its not showing up in people search or the GETs from above, fails with a generic error message as response “Dont know whats wrong, try again later”.

I assume that works as soon as i manage to get the authentication for that running.

I tried many things i found but nothing seems to work.

Any ideas?

How to trigger the switch “Has access on site” under users details via API?

We want to disable certain users access but still want to keep the user in the system for next 90days before we delete the user.

I tried:
$url = “JIRA_url/user?accountId=yyy”
$body = @{
active = “False”
Invoke-RestMethod -Method PUT -Uri $url -Body $body

I got the error:
Invoke-RestMethod : The remote server returned an error: (405) Method Not Allowed