List users that are assigned to the zone (organization). See Using Global API Keys for more information on permission and scope requirements.
Successful Operation
Invalid Request
$apiKey = 'your_automox_api_key' $headers = @{ "Authorization" = "Bearer $apiKey" "Content-Type" = "application/json" } $url = "https://console.automox.com/api/accounts/{accountId}/zones/{zoneId}/users" $response = (Invoke-WebRequest -Method Get -Uri $url -Headers $headers).Content
{- "data": [
- {
- "id": 50687,
- "uuid": "56e207a9-3b3e-48f1-b738-4172f11f70fd",
- "email": "gzmtest@automox.com",
- "first_name": "GZM",
- "last_name": "TestAccount",
- "status": "active",
- "account_rbac_role": "global-admin",
- "is_verified": false,
- "two_factor_authentication": "email",
- "created_at": "2021-10-20T16:03:25+0000",
- "zone_rbac_role": "zone-admin"
}
], - "metadata": {
- "total_pages": 1,
- "current_page": 0,
- "total_count": 1,
- "limit": 500,
- "links": [ ]
}
}