bolt-python icon indicating copy to clipboard operation
bolt-python copied to clipboard

Team ID is set during installation, but is missing when app runs multi_teams_authorization.MultiTeamsAuthorization

Open kabam-blambert opened this issue 1 month ago • 1 comments

We've developed an assistant that we are trying to run org-wide. I'm working on converting the app from using a bot token to having the oauth flow in place. Currently when I follow the /slack/install path I get the message: Handling an OAuth callback success in the logs and I can verify that the installation data is present in the installation store. The issue arises when I then go to interact with the bot.

When opening the pane to chat with the bot it hangs and never loads properly. I then see a message in the logs to the effect of:

authorize : authorize.py : _debug_log_for_not_found | DEBUG | 2025-12-04 19:52:48,531 | No installation data found for enterprise_id: {ENTERPRISE_ID} team_id: None

Each of the installations seems to be for a specific TEAM ID, but this doesn't seem to be passed to the auth middleware when accessing the chat pane?

My current oauth settings are as follows:

oauth_settings = OAuthSettings(
    client_id=os.environ["SLACK_CLIENT_ID"],
    client_secret=os.environ["SLACK_CLIENT_SECRET"],
    scopes=["app_mentions:read",
            "assistant:write",
            "channels:history",
            "channels:read",
            "chat:write",
            "chat:write.public",
            "groups:history",
            "groups:read",
            "im:history",
            "im:read",
            "im:write",
            "mpim:history",
            "mpim:read",
            "mpim:write",
            "users:read",
            "users:read.email"
    ],
    installation_store=FileInstallationStore(base_dir="/mnt/data/installations"),
    state_store=FileOAuthStateStore(expiration_seconds=600, base_dir="/mnt/data/states"),
    install_page_rendering_enabled=False,
)

kabam-blambert avatar Dec 04 '25 20:12 kabam-blambert

Hey @kabam-blambert 👋🏼

Our working assumption from the details you've provided is that because the app was initially installed directly into the organization and then followed up by OAuth (re-)installations, the app now doesn't know which installations it should interact with.

Try clearing your installation store, uninstalling the app everywhere, then install it with the OAuth flow (/slack/install) – start from a clean slate, basically.

Let us know if that resolves the issue. If not, we'll attempt to reproduce it and provide further guidance!

misscoded avatar Dec 05 '25 20:12 misscoded