manage_system or an active session and membership in the team or channel.
External DocumentationTo learn more, visit the Mattermost documentation.
Basic Parameters
| Parameter | Description |
|---|---|
| Channel ID | The ID of a channel to filter users in a specific channel. |
| Filter Active Users | Select to return active or inactive users only. |
| Group ID | The ID of a group to filter users by. Requires manage_system permission. |
| Page | The page number to retrieve, starting at 0. |
| Per Page | The maximum number of items to retrieve per page. |
| Return All Pages | Automatically fetch all resources, page by page. |
| Sort | The field to sort users by. To sort by last_activity_at or create_at a Team ID is required. To sort by status a Channel ID is required. To sort by display_name a Group ID is required.For more information, see sort parameter explanation |
| Team ID | The ID of a team to filter users in a specific team. |
Advanced Parameters
| Parameter | Description |
|---|---|
| ABAC Match Only | Select to restrict results to users whose attributes satisfy the channel’s Attribute-Based Access Control (ABAC) membership policy. |
| Channel Roles | A comma-separated list of channel roles to filter users by. Must be used with the In Channel parameter. |
| Group Constrained | Select to return only users allowed to join the channel or team based on group constraints. Use with Not In Channel or Not In Team. |
| Not In Channel | The ID of a channel to exclude members from the results. Must be used with the In Channel parameter. |
| Not In Team | The ID of a team to exclude users from. Cannot be used with the In Team parameter. |
| Role | The role to filter results by. |
| Roles | A comma-separated list of system roles to filter users by. Returns users that match any of the specified roles. For example: system_admin,system_user returns users that are either system admins or system users. |
| Team Roles | A comma-separated list of team roles to filter users by. Must be used with the In Team parameter.For example: team_user returns users that are only team users and not admins or guests. |
| Without Team | Select to return only users that are not on any team. Takes precedence over In Team, In Channel, and Not In Channel. |
Example Output
[
{
"id": "string",
"create_at": 0,
"update_at": 0,
"delete_at": 0,
"username": "string",
"first_name": "string",
"last_name": "string",
"nickname": "string",
"email": "string",
"email_verified": true,
"auth_service": "string",
"roles": "string",
"locale": "string",
"notify_props": {
"email": "string",
"push": "string",
"desktop": "string",
"desktop_sound": "string",
"mention_keys": "string",
"channel": "string",
"first_name": "string",
"auto_responder_message": "string",
"push_threads": "string",
"comments": "string",
"desktop_threads": "string",
"email_threads": "string"
},
"props": {},
"last_password_update": 0,
"last_picture_update": 0,
"failed_attempts": 0,
"mfa_active": true,
"timezone": {
"useAutomaticTimezone": "string",
"manualTimezone": "string",
"automaticTimezone": "string"
},
"terms_of_service_id": "string",
"terms_of_service_create_at": 0
}
]