admin.users.invite returns user_disabled / failed_to_send_invite instead of reactivating a deactivated guest
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- Une demi-journée
- Accessibilité débutants
- 42/100
Piste de recherche
Start with the admin_users_invite method in slack_sdk/web/client.py and the payloads it sends, then compare them with the published admin.users.invite contract; the reported errors come from Slack's server, not from Python code, so read the response handling before assuming an SDK defect. Reproducing needs an Enterprise Grid org with an org-level admin token and deactivated guest accounts, which most contributors cannot obtain, so first confirm with the maintainers whether the outcome is a docs clarification or an SDK change. Done means the documented reactivation behaviour and the user_disabled / failed_to_send_invite errors are reconciled and guests-only cases are explicitly addressed.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Summary
admin.users.invite does not reactivate a deactivated guest user, although the docs say it should. Instead it returns user_disabled or failed_to_send_invite, depending on the user's previous status.
The admin.users.invite docs say:
This Admin API invites a user to a workspace. If this method is used on a workspace-level user who is deactivated on the org level, the user will be reactivated on both the workspace and the org level.
The error table describes user_disabled only as "The user account is disabled." It doesn't explain how that fits with the reactivation behavior described above.
Reproducible in
slack_sdk==3.45.0
Python 3.12.1
OS: macOS (Darwin 25.6.0)
Enterprise Grid org, org-level admin user token with admin.users:write
Steps to reproduce
from slack_sdk import WebClient
from slack_sdk.errors import SlackApiError
client = WebClient(token="xoxp-...") # org admin user token
try:
response = client.admin_users_invite(
team_id="T...", # workspace the user previously belonged to
email="[email protected]",
channel_ids="C...",
is_ultra_restricted=True,
)
print(response.data)
except SlackApiError as e:
print(e.response["error"])
| Case | User's status before the call (as shown in admin) | Result |
|---|---|---|
| A | Deactivated, previously Multi-Channel Guest | user_disabled |
| B | Deactivated, previously Invited Guest (never accepted the invite) | failed_to_send_invite |
In both cases the user is deactivated at the org level.
I tried both guest role options and got the same results each time, so the failure doesn't seem to come from a mismatch between the requested role and the user's previous role:
is_ultra_restricted=True, is_restricted=False(single-channel guest)is_ultra_restricted=False, is_restricted=True(multi-channel guest)
Expected result
Based on the docs, the user is reactivated at the workspace and org levels and gets access to the given channel(s).
Actual result
The call fails with user_disabled (case A) or failed_to_send_invite (case B), and the user stays deactivated.
Questions
- Does the reactivation behavior apply to guest accounts (multi-channel or single-channel), or only to full members? If only to members, could the docs say so?
- What does
user_disabledmean for this method, given that the docs say a deactivated user will be reactivated? - For a user who was only ever invited and never accepted (case B), what is the supported way to re-invite or reactivate them through the API?
- If guests can't be reactivated this way, what is the recommended API for reactivating a deactivated guest as a single-channel or multi-channel guest?
Thanks!
- Langage dominant
- Python
- Étoiles
- 4k
- Forks
- 874
- Merge moyen
- 13 h 22 min
- PR mergées (30 j)
- 64
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de slackapi/python-slack-sdk
-
`WebClient` raises `JSONDecodeError` instead of `SlackApiError` on a malformed JSON body when retry handlers are setPeut-être pris @agustin18 l’a pris il y a 13 jours. Ouvertebug semver:major web-client
Difficulté 2/5 1-3 heures Accessibilité débutants 30/100
slackapi/python-slack-sdk#2070 ·
Les mainteneurs répondent en général sous 1 jour
-
SignatureVerifier.is_valid raises instead of returning False for a malformed timestamp, signature or bodyPeut-être pris @AmyScript l’a pris il y a 12 jours. Ouvertebug security semver:patch
Difficulté 2/5 1-3 heures Accessibilité débutants 57/100
slackapi/python-slack-sdk#2067 · 2 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Add missing Web API methods that are documented on docs.slack.dev to WebClientPeut-être pris @zimeg l’a pris il y a 19 jours. Ouverteenhancement web-client
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
slackapi/python-slack-sdk#2014 · 2 commentaires · 2 réactions · 2 personnes assignées ·
Les mainteneurs répondent en général sous 1 jour
-
Installation and Bot reject ISO 8601 timestamps with a negative UTC offset or a Z suffixPeut-être pris @hello-ashleyintech l’a pris il y a 44 jours. Ouverteauto-triage-stale bug
slackapi/python-slack-sdk#1989 · 2 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
chat_postMessage silently forwards thread_id to the API, so a threaded reply posts to the channelPeut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouverteauto-triage-skip enhancement
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
slackapi/python-slack-sdk#1923 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de slackapi/python-slack-sdk
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
plone/plone.observability#114 ·
Les mainteneurs répondent en général sous 1 jour
-
area:docs type:docs
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
jejjohnson/gauss_flows#246 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
openvax/varcode#824 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Add SAS as a cable typeOuvertenetbox status: needs triage type: feature
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
netbox-community/netbox#23868 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
emeryberger/CSrankings#15757 ·
Les mainteneurs répondent en général sous 9 jours