Skip to main content

admin.analytics.members.metadata method

The features within are only available to Slack workspaces on an Enterprise plan.

Don't have a paid plan? Join the Developer Program and provision a fully-featured sandbox for free.

Facts​

DescriptionRetrieves profile metadata for each member of an organization or workspace. Returns the same profile fields as the member analytics dashboard, sorted by user ID, as the companion of admin.analytics.members.activity.
Method Access
GET https://slack.com/api/admin.analytics.members.metadata
Scopes
Content types
application/x-www-form-urlencoded

Arguments​

Required arguments

tokenstringRequired

Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.

Example: xxxx-xxxxxxxxx-xxxx

Optional arguments

include_deactivated_sinceOptional

Also return members deactivated on or after this day, as YYYY-MM-DD in UTC. Without it, only active members are returned.

Example: 2026-09-01
team_idstringOptional

Workspace ID to scope the results to. With an organization-level token, omit it for organization-wide results. A workspace-level token may only pass its own workspace.

Example: T1234567890
member_typesarrayOptional

Comma-separated list of member types to include. Omit to include every member type.

Maximum: 9
Acceptable values: regular_members single_channel_guests multi_channel_guests frontline_members org_owners org_admins workspace_owners workspace_admins invited
Example: single_channel_guests,multi_channel_guests
querystringOptional

Space-delimited search terms matched against member names, and against email addresses when the organization shows them. When the organization hides email addresses, or hides guest email addresses, the search does not match on email at all, so a hidden address cannot be recovered by searching for it. Only matching members are returned.

Example: jane doe
cursorstringOptional

Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection.

Example: Y3Vyc29yX21hcms6QW9JSUtqWTA=
limitintegerOptional

Maximum number of members to return. Max allowed is 500.

Default: 100

Usage info​

This method returns, as JSON, the same per-member profile fields as the member analytics dashboard: username, names, title, email addresses, the member's workspaces, and the SCIM profile attributes the organization maps to profile fields (department, cost center, division, phone numbers, manager, location and so on). It is the companion of the admin.analytics.members.activity method, which returns the activity metrics; together they replace the member type of the admin.analytics.getFile method.

Results are sorted by user ID and paginated with the cursor parameter. This method supports searching by name and email with the query parameter; the admin.analytics.members.activity method does not. To combine the two, join on the user_id response field: list or search members here and pass each page's IDs to the admin.analytics.members.activity method as the user_ids parameter. Pages of the two methods are not interchangeable: this method has no activity date range, so it can include members (for example, ones created after the range) that the same page of the admin.analytics.members.activity method leaves out.

To cover the members in a response from the admin.analytics.members.activity method, pass the date response field from that response as the include_deactivated_since parameter: members deactivated on or after that day are then included, so every member of the activity response is also returned here. The two responses are still joined on the user_id response field, not by page.

Email addresses follow the organization's settings: the email and alternate_email response fields are omitted when the organization hides email addresses, or hides guest email addresses and the member is a guest. Fields a member has no value for are omitted from their row. The workspaces response field is only returned for organization-level requests. When there are no more pages, the response_metadata response field is omitted.


Response​

A page of members, sorted by user ID, with their profile metadata.

{
"ok": true,
"members": [
{
"user_id": "U0123ABCD",
"team_id": "E0123ABCD",
"enterprise_id": "E0123ABCD",
"date_created": 1600000000,
"username": "jane.doe",
"real_name": "Jane Doe",
"display_name": "jane",
"user_title": "Staff Engineer",
"email": "jane.doe@example.com",
"workspaces": {
"T0123ABCD": "Engineering",
"T0456EFGH": "Design"
},
"department": "Platform",
"cost_center": "CC-1234",
"country": "US"
}
],
"response_metadata": {
"next_cursor": "Y3Vyc29yX21hcms6QW9JSUtqWTA="
},
"total_count": 1250
}

Typical error response

{
"ok": false,
"error": "invalid_arguments"
}

Errors​

This table lists the expected errors that this method could return. However, other errors can be returned in the case where the service is down or other unexpected factors affect processing. Callers should always check the value of the ok parameter in the response.

Error
Description
access_denied

Access to a resource specified in the request is denied.

accesslimited

Access to this method is limited on the current network

account_inactive

Authentication token is for a deleted user or workspace when using a bot token.

admin_analytics_disabled

Analytics are temporarily unavailable. Wait and try again.

deprecated_endpoint

The endpoint has been deprecated.

ekm_access_denied

Administrators have suspended the ability to post a message.

enterprise_is_restricted

The method cannot be called from an Enterprise.

fatal_error

The server could not complete your operation(s) without encountering a catastrophic error. It's possible some aspect of the operation succeeded before the error was raised.

feature_not_available

The team's plan does not include analytics API access.

incomplete_analytics

The full set of results could not be retrieved. Wait and try again.

internal_error

The server could not complete your operation(s) without encountering an error, likely due to a transient issue on our end. It's possible some aspect of the operation succeeded before the error was raised.

invalid_arg_name

The method was passed an argument whose name falls outside the bounds of accepted or expected values. This includes very long names and names with non-alphanumeric characters other than _. If you get this error, it is typically an indication that you have made a very malformed API call.

invalid_arguments

Required arguments either were not provided or contain invalid values, including an include_deactivated_since that is not a real day or is in the future.

invalid_array_arg

The method was passed an array as an argument. Please only input valid strings.

invalid_auth

Some aspect of authentication cannot be validated. Either the provided token is invalid or the request originates from an IP address disallowed from making the request.

invalid_charset

The method was called via a POST request, but the charset specified in the Content-Type header was invalid. Valid charset names are: utf-8 iso-8859-1.

invalid_cursor

The cursor value is not valid.

invalid_form_data

The method was called via a POST request with Content-Type application/x-www-form-urlencoded or multipart/form-data, but the form data was either missing or syntactically invalid.

invalid_post_type

The method was called via a POST request, but the specified Content-Type was invalid. Valid types are: application/json application/x-www-form-urlencoded multipart/form-data text/plain.

member_analytics_disabled

Member analytics are disabled for the team.

method_deprecated

The method has been deprecated.

missing_argument

A required argument was not provided. The response's arg field names the missing argument. Arguments sent in a JSON body are ignored by methods that don't list application/json as a content type.

missing_post_type

The method was called via a POST request and included a data payload, but the request did not include a Content-Type header.

missing_scope

The token used is not granted the specific scope permissions required to complete this request.

no_permission

The workspace token used in this request does not have the permissions necessary to complete the request. Make sure your app is a member of the conversation it's attempting to post a message to.

not_allowed_token_type

The token type used in this request is not allowed.

not_an_admin

The token's user is not an owner or admin, and does not have permission to access the analytics API.

not_authed

No authentication token provided.

org_login_required

The workspace is undergoing an enterprise migration and will not be available until migration is complete.

rate_limited

The organization has made too many calls to this method in a short amount of time. Wait and try again.

ratelimited

The request has been ratelimited. Refer to the Retry-After header for when to retry the request.

request_timeout

The method was called via a POST request, but the POST data was either missing or truncated.

service_unavailable

The service is temporarily unavailable

team_access_not_granted

The token used is not granted the specific workspace access required to complete this request.

team_added_to_org

The workspace associated with your request is currently undergoing migration to an Enterprise Organization. Web API and other platform operations will be intermittently unavailable until the transition is complete.

team_not_on_org

team_id is not a workspace the token can access: it is not part of the token's organization, or the token is workspace-level and team_id is another workspace.

token_expired

Authentication token has expired

token_revoked

Authentication token is for a deleted user or workspace or the app has been removed when using a user token.

too_many_search_results

The search returned too many members. Narrow the query.

two_factor_setup_required

Two factor setup is required.