python-slack-sdk icon indicating copy to clipboard operation
python-slack-sdk copied to clipboard

Phone number not populated in correct field for user

Open jack-tutor opened this issue 8 months ago • 2 comments

Calling this function: users_profile_get https://api.slack.com/methods/users.profile.get

The returned json for a user with their phone number populated in their account is not landing in the proper field.

Here is the (censored) output:

{'title': '***', 'phone': '', 'skype': '', 'real_name': 'Jane Doe', 'real_name_normalized': 'Jane Doe', 'display_name': 'Jane', 'display_name_normalized': 'Jane', 'fields': {'Xf03V0V57HGB': {'value': '***', 'alt': ''}, 'Xf03KD1X40SK': {'value': '1113334567', 'alt': ''}, 'Xf03KW23CLEQ': {'value': '***', 'alt': ''}}, 'status_text': '', 'status_emoji': '', 'status_emoji_display_info': [], 'status_expiration': 0, 'avatar_hash': '66992cc08e8d', 'image_original': '**', 'is_custom_image': True, 'email': '[email protected]', 'pronouns': 'she/her', 'huddle_state': 'default_unset', 'huddle_state_expiration_ts': 0, 'first_name': 'Jane', 'last_name': Doe'}

See how the phone number field is the empty string but the phone number was populated into Xf03KD1X40SK value

The field it populated is labeled as a custom field in the docs. This appears to be a problem with this user specifically - not others in the org - so I suspect having other fields set (like pronouns which was set recently) triggered the API to behave differently and treat the phone number differently

jack-tutor avatar Jun 10 '25 14:06 jack-tutor

Hey @jack-tutor! 👋 This is interesting - thanks for sharing these outputs! 👾

The field it populated is labeled as a custom field in the docs.

I'm finding a phone number appears in both the phone and fields attributes when this is set as part of the default profile "Contact information" section.

Some adjustments were made when testing without finding similar missing results...

I suspect having other fields set (like pronouns which was set recently) triggered the API to behave differently and treat the phone number differently

Was the pronoun setting changed for workspace settings or the individual profile?

Either case is confusing to me and I'm wondering too if another call to the users.profile.get method can be made with the include_labels option set to true for debugging purposes?

zimeg avatar Jun 10 '25 22:06 zimeg

Pronoun was changed for the individual. I haven't replicated this for the other members of the organization I have tested against.

This bug also no longer replicates with that user either - though it was consistent on the day I posted the issue.

Setting include_labels included the label Phone for the Xf03KD1X40SK - otherwise had no noticable, relevant change.

jack-tutor avatar Jun 14 '25 16:06 jack-tutor

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

github-actions[bot] avatar Jul 21 '25 00:07 github-actions[bot]

As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.

github-actions[bot] avatar Aug 04 '25 00:08 github-actions[bot]