Github might restrict number of OAuth access tokens for a Jira DVCS connector set up with one account

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

Currently a DVCS connector is setup with a authorizing service account and OAuth id/secret to link with github organization based on linking-github-repository-with-jira. The service account might have access to a number of organizations. At times users might link a new account for a new organization using the same id/secret combination used for the service account, resulting in one oauth app for multiple organizations. This resulted in JIRA at times running out of a number of access tokens allowed per user/application/scope combination. This is documented under https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/

Diagnosis

Collect any supporting logs from Github to identify any possible problems with authorization or generation of an access token. In the current scenario, the GitHub logs show errors similar to below

1 2 oauth_access.destroy OAuth application (JIRA GitHub DVCS) deleted automatically (max accesses for application) Performed by xxxxxx from (United States)

Resolution

It is suggested to create a unique OAuth app for each organization in Github to avoid running into a similar issue.

https://confluence.atlassian.com/adminjiraserver073/linking-a-bitbucket-or-github-repository-with-jira-867028213.html

https://confluence.atlassian.com/jirakb/how-to-add-github-organization-repositories-to-jira-815256707.html

https://confluence.atlassian.com/jirakb/slow-appearing-commits-from-bitbucket-or-github-in-jira-779160823.html

https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.