Skip to content

feat: add apps.managed.permissions.set method - #2052

Merged
zimeg merged 2 commits into
mainfrom
zimeg-feat-apps-managed-permissions-set
Nov 18, 2026
Merged

zimeg merged 2 commits into
mainfrom
zimeg-feat-apps-managed-permissions-set

Conversation

@zimeg

@zimeg zimeg commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

This pull request adds the apps.managed.permissions.set method to the Web API clients.

  • apps_managed_permissions_set takes a required app_id and permissions, either everyone or app_owner. The token must be issued to the manager app that created the app.
  • The async and legacy clients are regenerated with scripts/codegen.py, and the method is added to the Web API coverage test.

This is the only pull request in the apps.managed stack, so it's based on main. It's in the B7 app settings batch. Related to #2014.

  1. feat: add apps.managed.permissions.set method #2052 apps.managed.permissions.set 👈 this pull request

Testing

With a token issued to a manager app (app_configurations:write), for an app that manager app created:

  1. Call client.apps_managed_permissions_set(app_id=..., permissions="everyone") and confirm the response has "permission_type": "everyone".
  2. Call it with permissions="app_owner" and confirm "permission_type": "named_entities" with the calling user in user_ids.
  3. Repeat with AsyncWebClient to check the generated async method.

Live check: in an Enterprise sandbox enabled for managed apps, the org admin user token of a test app with app_configurations:write is a manager app token. With it, apps_manifest_create made a managed app, and both calls returned ok from WebClient and AsyncWebClient. everyone came back as "permission_type": "everyone", and app_owner as "named_entities" with the calling user in user_ids. A token that isn't issued to a manager app returns manager_app_not_eligible, and permissions="bogus" returns invalid_arguments (must be a valid enum value).

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

@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 (770ca65) to head (d0e2edf).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2052   +/-   ##
=======================================
  Coverage   84.64%   84.65%           
=======================================
  Files         118      118           
  Lines       14071    14080    +9     
=======================================
+ Hits        11910    11919    +9     
  Misses       2161     2161           

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

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg
zimeg force-pushed the zimeg-feat-apps-managed-permissions-set branch from 3cfb97d to a8bd56e Compare November 18, 2026 06:15
@zimeg
zimeg changed the base branch from zimeg-feat-apps-icon-set to main November 18, 2026 06:15
@zimeg
zimeg marked this pull request as ready for review November 18, 2026 20:41
@zimeg
zimeg requested a review from a team as a code owner November 18, 2026 20:41

@cchensh cchensh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

# Conflicts:
#	slack_sdk/web/async_client.py
#	slack_sdk/web/client.py
#	slack_sdk/web/legacy_client.py
#	tests/slack_sdk_async/web/test_web_client_coverage.py

@mwbrooks mwbrooks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Thanks @zimeg! Trying permissions="bogus" to confirm the enum is checked before the manager app check was a nice touch.

@WilliamBergamin WilliamBergamin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 Thanks @zimeg! Matches the docs.slack.dev spec exactly, and codegen.py reproduces the async and legacy clients with no diff.
Left two small comments, nothing blocking 🚀

Comment thread slack_sdk/web/client.py
to the app's owner.
"""
kwargs.update({"app_id": app_id, "permissions": permissions})
return self.api_call("apps.managed.permissions.set", params=kwargs)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 praise: Same keyword-only pass-through shape as the sibling apps.* methods, sorted between icon and manifest, so it reads like it was always there.

Comment thread slack_sdk/web/client.py Resolved
@zimeg

zimeg commented Nov 18, 2026

Copy link
Copy Markdown
Member Author

🌟 Thanks for the kind reviews @cchensh, @WilliamBergamin and @mwbrooks!

@zimeg
zimeg merged commit cf80853 into main Nov 18, 2026
19 checks passed
@zimeg
zimeg deleted the zimeg-feat-apps-managed-permissions-set branch November 18, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality semver:minor web-client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants