Skip to content

Test scoped access on a staging app

Check every member and project scenario before you go live

Test scoped access settings on a separate staging app before you change your production app. You can't turn off a setting after you save it, and a setting applies to every person who authorizes the app.

Create a staging app

Create a second OAuth app that mirrors your production app. Follow the steps in Create an OAuth app, with these differences:

  • Select the same scopes as your production app.
  • Set the redirect URL to your staging environment.

Then configure your staging environment to use the new app's client ID and client secret.

Turn on scoped access

  1. In the OAuth Apps tab, open your staging app's settings.
  2. Select Use the permissions of the person who connects, Ask for specific projects, or both.
  3. Save the app.

Set up a test organization

Create an organization with enough members and projects to cover each scenario:

  • Members with the Owner, Administrator, Developer, and Read-only roles
  • At least three projects
  • On the Team or Enterprise plan, a member with a project-scoped role

Test each scenario

Authorize your staging app as different members and check each result. Run only the scenarios for the settings you turned on, plus the scenarios marked Any. The Developer row applies only when every scope your app requests has a lowest role of Developer or lower. See Request only the scopes you need. The Read-only row applies only when your app requests at least one write scope.

ScenarioSettingExpected result
A Developer authorizes the appMember permissionsAuthorization succeeds. Your app stores a connection for that member.
A Read-only member authorizes an app that requests write scopesMember permissionsThe consent screen shows a warning and the member can't approve. No redirect reaches your app.
A member's role is lowered after they authorizeMember permissionsRequests the role no longer covers return 403. Your app prompts the person.
A member is removed from the organizationMember permissionsRequests return 403. Your app tells the person to ask an administrator to restore their membership, or to have another member connect.
A member chooses All current and future projectsProject selectionYour app works with every project, as it does without the setting.
A project is created after an all-projects authorizationProject selectionYour app can reach the new project without re-authorization.
A member selects one of three projectsProject selectionYour app shows and changes only that project.
A member selects a project where their role doesn't cover your scopesBothThe consent screen flags that project. The member deselects it to approve.
A project is created after a specific-projects authorizationProject selectionYour app doesn't show the project and offers to re-authorize.
A member re-authorizes to add a projectProject selectionThe new selection replaces the old one. Your app keeps its state for kept projects.
Your app requests a branchProject selectionThe request uses the parent project's grant.
A person cancels on the consent screenAnyYour redirect URL receives error=access_denied. Your app lets them try again.
An administrator revokes the app for the organizationAnyAll member grants end. Your app handles the revoked tokens.

Turn on scoped access for production

After every scenario for the settings you turned on passes, turn on the same settings for your production app. Grants created before the change keep working, and the settings apply the next time a person authorizes your app.

Access is granted per app, so your production app needs its own request. If the settings don't appear on your production app, open a support ticket and include your production app's client ID.

For the code changes behind each scenario, see Update your app for scoped access.