As described here you can get a full list of all users using:
GET /rest/api/3/users
However, this API version is only available for cloud users.
How can we get a list of all user (active and inactive) on Data Center Jira? It is quite unbelievable that among all the different API calls one can make, this is not one of them... 😲