User object
A user object contains information about a Slack workspace user.
If you develop for an Enterprise organization, there's a lot to consider about the most important field in a user object: the id or user_id. Learn more about global IDs and migration.
Example
{
"user": {
"id": "U123ABC456",
"team_id": "T123ABC456",
"name": "sherlock",
"deleted": false,
"color": "99a949",
"real_name": "Sherlock Holmes",
"tz": "Europe/London",
"tz_label": "Greenwich Mean Time",
"tz_offset": 0,
"profile": {
"title": "Senior Detective",
"phone": "(000) 000-0000",
"skype": "",
"real_name": "Sherlock Holmes",
"real_name_normalized": "Sherlock Holmes",
"display_name": "sherlock",
"display_name_normalized": "sherlock",
"fields": {
"Xf111AAA111": {
"value": "1 dog: Sherlock Bones",
"alt": ""
},
"Xf222BBB222": {
"value": "no tree nuts!",
"alt": ""
}
},
"status_text": "elementary, my dear watson ",
"status_emoji": ":thinking-face:",
"status_emoji_display_info": [
{
"emoji_name": "thinking-face",
"display_url": "https://emoji.slack-edge.com/T123ABC456/thinking-face/123...abc.png"
}
],
"status_expiration": 0,
"avatar_hash": "b187f5128ba4",
"start_date": "2015-12-25",
"image_original": "https://avatars.slack-edge.com/2021-10-21/..._...__original.jpg",
"is_custom_image": true,
"email": "sholmes@example.com",
"pronouns": "they/them",
"huddle_state": "default_unset",
"huddle_state_expiration_ts": 0,
"first_name": "Sherlock",
"last_name": "Holmes",
"image_24": "https://avatars.slack-edge.com/2021-10-21/..._...__24.jpg",
"image_32": "https://avatars.slack-edge.com/2021-10-21/..._...__32.jpg",
"image_48": "https://avatars.slack-edge.com/2021-10-21/..._...__48.jpg",
"image_72": "https://avatars.slack-edge.com/2021-10-21/..._...__72.jpg",
"image_192": "https://avatars.slack-edge.com/2021-10-21/..._...__192.jpg",
"image_512": "https://avatars.slack-edge.com/2021-10-21/..._...__512.jpg",
"image_1024": "https://avatars.slack-edge.com/2021-10-21/..._...__1024.jpg",
"status_text_canonical": "",
"team": "T0123ABC456"
},
"is_admin": false,
"is_owner": false,
"is_primary_owner": false,
"is_restricted": false,
"is_ultra_restricted": false,
"is_bot": false,
"is_app_user": false,
"updated": 1675264590,
"is_email_confirmed": true,
"who_can_share_contact_card": "EVERYONE",
"enterprise_user": {
"id": "U123ABC456",
"enterprise_id": "E123ABC456",
"enterprise_name": "Sherlock Holmes Detective Agency",
"is_admin": false,
"is_owner": false,
"is_primary_owner": false,
"teams": [
"T123ABC456",
"T789DEF000"
]
}
}
}
Common fields
The composition of user objects can vary greatly depending on the API being used, or the context of each Slack workspace. Data that has not been supplied may not be present at all, may be null, or may contain an empty string. One example where the profile information varies is getting data for a user connected through Slack Connect; an example of that type of user object can be found in the External members section of the Slack Connect page.
Therefore, consider the following a list of potential user object fields you might encounter.
| Field | Type | Description |
|---|---|---|
always_active | Boolean | Indicates that a bot user is set to be constantly active in presence status. |
color | String | Used in some clients to display a special username color. |
deleted | Boolean | This user has been deactivated when the value of this field is true. Otherwise the value is false, or the field may not appear at all. |
enterprise_id | String (enterprise_id) | Enterprise org ID (enterprise variant top-level field). |
enterprise_name | String | Enterprise org name (enterprise variant top-level field). |
enterprise_user | Object | An object containing info related to an Enterprise org user. See our Enterprise org documentation for more detail. |
enterprise_user.enterprise_id | String | A unique ID for the Enterprise organization this user belongs to. |
enterprise_user.enterprise_name | String | A display name for the Enterprise organization. |
enterprise_user.id | String | This user's ID - some Enterprise org users have a kind of dual identity — a local, workspace-centric user ID as well as a org-wise user ID, called the Enterprise user ID. In most cases these IDs can be used interchangeably, but when it is provided, we strongly recommend using this Enterprise user id over the root level user id field. |
enterprise_user.is_admin | Boolean | Indicates whether the user is an Admin of the Enterprise organization. |
enterprise_user.is_owner | Boolean | Indicates whether the user is an Owner of the Enterprise organization. |
enterprise_user.is_primary_owner | Boolean | Whether the user is the primary owner of the enterprise. |
enterprise_user.teams | String[] | An array of workspace IDs that are in the Enterprise organization. |
first_login | Integer | Unix timestamp of user's first login. |
has_2fa | Boolean | Describes whether two-factor authentication is enabled for this user. Only visible if the user executing the call is an admin. |
id | String | Identifier for this workspace user. It is unique to the workspace containing the user. Use this field together with team_id as a unique key when storing related data or when specifying the user in API requests. We recommend considering the format of the string to be an opaque value, and not to rely on a particular structure. |
is_admin | Boolean | Indicates whether the user is an Admin of the current workspace. |
is_agentforce_bot | Boolean | Whether this is an Agentforce bot user. |
is_app_user | Boolean | Indicates whether the user is an authorized user of the calling app. |
is_bot | Boolean | Indicates whether the user is actually a bot user. Bleep bloop. Note that Slackbot is special, so is_bot will be false for it. |
is_email_confirmed | Boolean | Whether the user's email address has been confirmed. |
is_external | Boolean | Whether the user is external to the workspace. |
is_forgotten | Boolean | Whether the user has been GDPR-forgotten. |
is_invited_user | Boolean | Only present (and always true) when a user has been invited but has not yet signed in. Once the user signs in, this field is no longer present. |
is_owner | Boolean | Indicates whether the user is an Owner of the current workspace. |
is_primary_owner | Boolean | Indicates whether the user is the Primary Owner of the current workspace. |
is_profile_only_user | Boolean | Whether this is a profile-only user (enterprise variant). |
is_restricted | Boolean | Indicates whether or not the user is a guest user. Use in combination with the is_ultra_restricted field to check if the user is a single-channel guest user. |
is_stranger | Boolean | If true, this user belongs to a different workspace than the one associated with your app's token, and isn't in any shared channels visible to your app. If false (or this field is not present), the user is either from the same workspace as associated with your app's token, or they are from a different workspace, but are in a shared channel that your app has access to. Read our shared channels docs for more detail. |
is_ultra_restricted | Boolean | Indicates whether or not the user is a single-channel guest. |
is_workflow_bot | Boolean | Whether this is a workflow bot user. |
locale | String | Contains a IETF language code that represents this user's chosen display language for Slack clients. Useful for localizing your apps. |
manual_presence | String | User's manually-set presence value. |
name | String | Don't use this. It once indicated the preferred username for a user, but that behavior has fundamentally changed since. |
presence | String | User's current presence status (e.g. "active", "away"). |
profile | Object | The profile object contains the default fields of a user's workspace profile. A user's custom profile fields may be discovered using users.profile.get. |
real_name | String | User's full real name (top-level copy from profile). |
restricted_user_type | Integer | Numeric type classification for restricted/guest users. |
suspended | Boolean | Whether the user account is suspended (non-enterprise variant). |
team | String (team_id) | Workspace ID (non-enterprise variant). |
team_id | String (team_id) | Workspace ID the user belongs to. |
team_profile | Object | Team profile fields and sections definitions. |
teams | Array of team_id | Workspace IDs the user belongs to (enterprise variant). |
two_factor_type | Enum (String) | Indicates the type of two-factor authentication in use. Only present if has_2fa is true. The value will be either app or sms. |
tz | String | A human-readable string for the geographic timezone-related region this user has specified in their account. |
tz_label | String | Describes the commonly used name of the tz timezone. |
tz_offset | Number | Indicates the number of seconds to offset UTC time by for this user's tz. Changes silently if changed due to daylight savings. |
updated | Number | A Unix timestamp indicating when the user object was last updated. |
who_can_share_contact_card | String | Contact card sharing permission setting. |
Profile fields
The following fields are the default fields of a user's workspace profile. A user may have additional custom fields, though! Use users.profile.get to view all the user's profile fields.
| Field | Type | Description |
|---|---|---|
always_active | Boolean | Indicates that a bot user is set to be constantly active in presence status. |
api_app_id | String (app_id) | App ID associated with this bot/app user. |
avatar_hash | String | Hash of the user's profile image. |
bot_id | String (bot_id) | Bot ID if this is a bot user profile. |
display_name | String | The display name the user has chosen to identify themselves by in their workspace profile. Do not use this field as a unique identifier for a user, as it may change at any time. Instead, use id and team_id in concert. |
display_name_normalized | String | The display_name field, but with any non-Latin characters filtered out. |
email | String | A valid email address. It cannot have spaces, and it must have an @ and a domain. It cannot be in use by another member of the same team. Changing a user's email address will send an email to both the old and new addresses, and also post a slackbot to the user informing them of the change. This field can only be changed by admins for users on paid teams. |
fields | Object | All the custom profile fields for the user. |
first_name | String | The user's first name. The name slackbot cannot be used. Updating first_name will update the first name within real_name. |
guest_expiration_ts | Integer or null | Unix timestamp when the guest account expires. |
guest_invited_by | String or null | User ID of who invited this guest. |
huddle_state | Enum | User's current huddle status. Possible values: default_unset, in_a_huddle, available_for_huddle. |
huddle_state_call_id | String or null | Call ID of the active huddle. |
huddle_state_channel_id | String or null | Channel ID of the active huddle. |
huddle_state_expiration_ts | Integer | When the huddle state expires. |
image_* | String | These various fields will contain https URLs that point to square ratio, web-viewable images (GIFs, JPEGs, or PNGs) that represent different sizes of a user's profile picture. |
image_24 | String (URI) or null | 24px profile image URL. |
image_1024 | String (URI) or null | 1024px profile image URL. |
image_original | String (URI) or null | Original profile image URL. |
is_agentforce_bot | Boolean | Whether this is an Agentforce bot. |
is_app_user | Boolean | Whether this is an app user (profile-level copy). |
is_custom_image | Boolean | Whether the user uploaded a custom profile image. |
is_restricted | Boolean or null | Guest user status (profile-level copy). |
is_sidekick_bot | Boolean | Whether this is a Sidekick bot. |
is_ultra_restricted | Boolean or null | Single-channel guest status (profile-level copy). |
last_avatar_image_hash | String | Hash of the last avatar image. |
last_name | String | The user's last name. The name slackbot cannot be used. Updating last_name will update the second name within real_name. |
memberships_count | Integer | Number of channel memberships. |
name | String or null | Name (profile-level copy). |
phone | String | The user's phone number, in any format. |
pronouns | String | The pronouns the user prefers to be addressed by. |
real_name | String | The user's first and last name. Updating this field will update first_name and last_name. If only one name is provided, the value of last_name will be cleared. |
real_name_normalized | String | The real_name field, but with any non-Latin characters filtered out. |
restricted_user_type | Integer or null | Numeric restricted user type (profile-level copy). |
skype | String | A shadow from a bygone era. It will always be an empty string and cannot be set otherwise. |
start_date | String | The date the person joined the organization. Only available if Slack Atlas is enabled. |
status_clear_on_focus_end | Boolean | Whether to clear status when focus mode ends. |
status_emoji | String | The displayed emoji that is enabled for the Slack team, such as :train:. |
status_emoji_display_info | Array of objects | Rich emoji display info (each has emoji_name, optional display_alias, display_url, unicode). |
status_expiration | Integer | The Unix timestamp of when the status will expire. Providing 0 or omitting this field results in a custom status that will not expire. |
status_text | String | The displayed text of up to 100 characters. We strongly encourage brevity. |
status_text_canonical | String or null | Canonical/system status text. |
team | String | The ID of the team the user is on. |
title | String | The user's title. |
updated | Integer | Profile last updated timestamp. |
user_id | String | User ID (profile-level copy). |
username | String or null | Username. |
who_can_share_contact_card | String | Contact card sharing permission. |
The users:read.email OAuth scope is now required to access the email field in user objects returned by the users.list and users.info web API methods. users:read is no longer a sufficient scope for this data field. Learn more.