slackapi / java-slack-sdk

Slack Developer Kit (including Bolt for Java) for any JVM language
https://slack.dev/java-slack-sdk/
MIT License
571 stars 212 forks source link

has_2fa field not present in users.list response #1340

Closed RUSLAN-SIMAKOV closed 1 month ago

RUSLAN-SIMAKOV commented 1 month ago

Hey there, according to API doc, https://api.slack.com/methods/users.list should return me a list of user objects with has_2fa field. Unfortunately, it's not (whereas my account as 2FA activated)

Reproducible in:

openjdk version "17.0.12" 2024-07-16 LTS OpenJDK Runtime Environment Corretto-17.0.12.7.1 (build 17.0.12+7-LTS) OpenJDK 64-Bit Server VM Corretto-17.0.12.7.1 (build 17.0.12+7-LTS, mixed mode, sharing)

The Slack SDK version

1.24.0

OS info

ProductName: macOS ProductVersion: 14.5 BuildVersion: 23F79 Darwin Kernel Version 23.5.0: Wed May 1 20:09:52 PDT 2024; root:xnu-10063.121.3~5/RELEASE_X86_64

Steps to reproduce:

  1. Execute client.usersList(UsersListRequest.builder().limit(PAGE_SIZE).cursor(finalCursor).build());
  2. Get memebers.
  3. Observe: { "ok": true, "members": [ { "id": "REMOVED_DATA", "team_id": "REMOVED_DATA", "name": "rsimakov", "deleted": false, "color": "e96699", "real_name": "ruslan simakov", "tz": "Europe/London", "tz_label": "British Summer Time", "tz_offset": 3600, "profile": { "title": "", "phone": "", "skype": "", "real_name": "REMOVED_DATA", "real_name_normalized": "REMOVED_DATA", "display_name": "REMOVED_DATA", "display_name_normalized": "REMOVED_DATA", "fields": null, "status_text": "", "status_emoji": "", "status_emoji_display_info": [], "status_expiration": 0, "avatar_hash": "gc23945564f4", "email": "REMOVED_DATA", "first_name": "REMOVED_DATA", "last_name": "REMOVED_DATA", "image_24": "REMOVED_DATA", "image_32": "REMOVED_DATA", "image_48": "REMOVED_DATA", "image_72": "REMOVED_DATA", "image_192": "REMOVED_DATA", "image_512": "REMOVED_DATA", "status_text_canonical": "", "team": "REMOVED_DATA" }, "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": 1721991584, "is_email_confirmed": true, "who_can_share_contact_card": "EVERYONE" } ], "cache_ts": 1722001311, "response_metadata": { "next_cursor": "" } }

Expected result:

has_2fa present in each member

Actual result:

has_2fa absent

RUSLAN-SIMAKOV commented 1 month ago

I tried to use OWNER's token and it works, but it not showing with slackbot token