Skip to content

fix: explain the restricted_scopes error returned when installing an app - #708

Merged
mwbrooks merged 1 commit into
mainfrom
mwbrooks-restricted-scopes-error
Oct 19, 2026
Merged

mwbrooks merged 1 commit into
mainfrom
mwbrooks-restricted-scopes-error

Conversation

@mwbrooks

Copy link
Copy Markdown
Member

Changelog

The restricted_scopes error now explains which kinds of scopes need an admin or owner to install, and how to resolve it.

Summary

This pull request adds a message and remediation for the restricted_scopes API error.

  • apps.developerInstall returns restricted_scopes when the installer can't grant a requested scope, such as admin and audit scopes.
  • Webapp will soon also refuse the Slack Connect bot scopes conversations.connect:manage and conversations.connect:write to installers without the matching permission, matching the OAuth install flow.
  • Before this change, the CLI showed only the bare error code with no explanation.

Preview

N/A

Testing

  1. Join a workspace as a member who is not an admin or owner.
  2. Add conversations.connect:manage to oauth_config.scopes.bot in an app manifest.
  3. Run slack install and confirm the error shows the new message and remediation.

Notes

  • A webapp follow-up will add the specific blocked scopes to the error response. The CLI already displays errors details from apps.developerInstall, so no further CLI change is needed for that.

Requirements

The apps.developerInstall method returns restricted_scopes when the
installer can't grant a requested scope, such as admin and audit
scopes or the Slack Connect bot scopes. Add a message and remediation
so the error says what happened and how to resolve it.
@mwbrooks mwbrooks added enhancement M-T: A feature request for new functionality semver:patch Use on pull requests to describe the release version increment labels Oct 16, 2026
@mwbrooks mwbrooks self-assigned this Oct 16, 2026
@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.15%. Comparing base (eb3bce3) to head (59dfe58).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #708   +/-   ##
=======================================
  Coverage   78.14%   78.15%           
=======================================
  Files         239      239           
  Lines       18125    18125           
=======================================
+ Hits        14164    14165    +1     
+ Misses       3961     3960    -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mwbrooks mwbrooks added this to the Next Release milestone Oct 16, 2026
@mwbrooks
mwbrooks marked this pull request as ready for review October 16, 2026 21:21
@mwbrooks
mwbrooks requested a review from a team as a code owner October 16, 2026 21:21

@zimeg zimeg 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.

@mwbrooks Thanks for keeping edges polished! 📠

@mwbrooks

Copy link
Copy Markdown
Member Author

Thanks for the review @zimeg 🙇🏻

@mwbrooks
mwbrooks merged commit 63989fe into main Oct 19, 2026
13 checks passed
@mwbrooks
mwbrooks deleted the mwbrooks-restricted-scopes-error branch October 19, 2026 19:47
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:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants