Skip to content

feat: add admin.analytics.members.metadata method - #2064

Draft
lukegalbraithrussell wants to merge 4 commits into
mainfrom
feat-admin-analytics-members-metadata
Draft

lukegalbraithrussell wants to merge 4 commits into
mainfrom
feat-admin-analytics-members-metadata

Conversation

@lukegalbraithrussell

@lukegalbraithrussell lukegalbraithrussell commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This pull request adds the admin.analytics.members.metadata method to the Web API clients.

  • admin_analytics_members_metadata returns profile metadata for each member of an organization or workspace: names, title, email addresses, workspaces, and SCIM profile attributes. All of its arguments are optional: include_deactivated_since, team_id, member_types, query, cursor, and limit. member_types takes a string or a list, and a list is sent comma-separated.
  • It's the companion of admin_analytics_members_activity, added in feat: add admin.analytics.members.activity method #2063, which returns members by ID only. Join the two on user_id, and search members here with query.
  • The async and legacy clients are regenerated with scripts/codegen.py, and the method is added to the Web API coverage test.

This pull request is independent of #2063, which adds admin.analytics.members.activity, so either one can be reviewed and merged first. Whichever merges second needs a rebase to update the endpoint count in the coverage test. Related to #2014.

Testing

With an org-level user token that has the admin.analytics:read scope, from a top-level admin or owner on an Enterprise+ org:

  1. Call client.admin_analytics_members_metadata() and confirm each entry in members has user_id and profile fields like real_name and email.
  2. Call it again with query set to part of a member's name, and confirm only matching members are returned.
  3. Repeat with AsyncWebClient to check the generated async method.

Live check: these calls ran against an Enterprise developer sandbox with an org-level user token that has admin.analytics:read. With this branch's WebClient, the call with no arguments returns profile fields like real_name, email, and workspaces. query with part of a member's name returns only matching members, and member_types works as a list and as a string. include_deactivated_since is accepted. limit=3 with cursor pages through every member with no repeats and matches total_count. LegacyWebClient and AsyncWebClient return ok too. The raw method also accepts both GET and POST, so the client's default POST works.

Category

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs (Documents)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I have signed the Salesforce CLA (required before your PR can be reviewed or merged).
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

🤖 Generated with Claude Code

lukegalbraithrussell and others added 2 commits November 18, 2026 12:18
Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
The activity method is added separately in #2063, so this branch only adds
admin.analytics.members.metadata.

Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
@lukegalbraithrussell
lukegalbraithrussell changed the base branch from feat-admin-analytics-members-activity to main November 18, 2026 20:23
…adata

Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.65%. Comparing base (b041c02) to head (29e10f7).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2064      +/-   ##
==========================================
+ Coverage   84.60%   84.65%   +0.04%     
==========================================
  Files         118      118              
  Lines       14067    14085      +18     
==========================================
+ Hits        11901    11923      +22     
+ Misses       2166     2162       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant