SourceTree does not identify missing API token scopes when authenticating with Bitbucket Cloud

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: Bitbucket, UX
    • None

      When configuring a Bitbucket Cloud account in SourceTree using an Atlassian API token, SourceTree displays generic authentication errors if the token is missing required scopes.

      In my case, the token initially included:

      • `read:repository:bitbucket`
      • `write:repository:bitbucket`

      SourceTree returned two authentication errors, but neither indicated which permissions were missing.

      After adding the following scopes, authentication succeeded:

      • `read:user:bitbucket`
      • `read:workspace:bitbucket`

      Expected behaviour:

      When authentication fails because an API token lacks required scopes, SourceTree should clearly identify the missing scopes by name in the error messages displayed at the bottom of the window.

      Actual behaviour:

      SourceTree displays two generic errors without identifying the missing permissions. Users are left guessing which additional scopes they need to grant.

      Why this matters:

      Atlassian recommends granting API tokens only the permissions required by the application (principle of least privilege).

      Without meaningful error messages, users may end up granting unnecessarily broad permissions just to get SourceTree working.

      This is particularly problematic during the migration from Bitbucket App Passwords to scoped API tokens.

      Reference:
      https://support.atlassian.com/bitbucket-cloud/docs/add-an-api-token-to-sourcetree-or-another-application/

              Assignee:
              Unassigned
              Reporter:
              Wojciech Smoliński
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: