Skip to main content
This flow can be executed using a human or a machine user.For machine users:
  • Send a valid Authorization header with of type Bearer TOKEN_VALUE where TOKEN_VALUE is the a JWT returned in the response from Machine User Token flow
This API Will return all users for an organization, if you want to get all users of an app you can refer to Link.
To get all users from an organization, you need to make a GET request to the following endpoint:

Headers

1

x-iam-orgid

Specify the Organization Id here. Example: 281185056586736799
curl --request GET \
  --url https://dev-iam.razi.ai/v1/authorization/organizations/users \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'X-App-Name: ' \
  --header 'X-Iam-Orgid: '

Query Parameters

1

page (optional, number)

Specifies the page number to retrieve. Use this parameter to paginate through large sets of organizations. Defaults to 0 if not provided. Example: ?page=2
2

pageSize (required, number)

Specifies the number of organizations to return per page. This helps to control the size of the response data. pageSize must not be greater than 100. Example: ?pageSize=10
Upon successful request, you will receive a paginated response similar to the below:
{
  "metadata": {
    "total": 10
  },
  "users": [
    {
      "id": "1234567890",
      "email": "[email protected]",
      "roles": [
        "admin",
        "user"
      ],
      "firstName": "John",
      "lastName": "Doe",
      "displayName": "John Doe"
    }
  ]
}
  • metadata.total: The total number of users available in the organization.
  • users: A list of users objects, with details of the user