User Management using Rest

Hello,

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:
    user/search?username=@&startAt=0&maxResults=1000&includeActive=true&includeInactive=true
    user/search?query=+
    only return active users

Searching directly for the key or accountId doesnt work either.
user?username=test4
user/picker?query=5d2dc405917eeb0c13b4d11d
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 https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-lifecycle-enable-post 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?