Skip to content

Regression: gh pr create fails on self-hosted runner in v2.76.0 – “Resource not accessible by integration (organization.teams)” #11360

@Pittan

Description

@Pittan

Note: English isn’t my strongest skill, so I used AI to help translate this issue. If anything looks odd, please feel free to let me know!

Describe the bug

Running gh pr create inside a GitHub Actions workflow on a self-hosted runner (GitHub Enterprise Server) fails in gh v2.76.0, while the same workflow succeeds in v2.75.1.

Error message:

error fetching organization teams: GraphQL: Resource not accessible by integration (organization.teams)

Affected version

gh version 2.76.0
(v2.75.1 works as expected)

GHE 3.14.7

Steps to reproduce the behavior

  1. On a GitHub Enterprise self-hosted runner, run the following command inside a workflow or shell (authenticated with the default GITHUB_TOKEN ):
env:
  GH_ENTERPRISE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  GH_HOST: ${{ secrets.GH_HOST }}
gh pr create \
  --title "[Auto Generated] Merge chore/investigate-gh-cli-actions into release20250722" \
  --body "- This PR was automatically created by GitHub Action" \
  --base release20250722 \
  --head chore/investigate-gh-cli-actions \
  --reviewer ${{ github.event.pull_request.user.login }}
  1. Observe the CLI output.
  2. The command exits with the GraphQL error shown above.

Expected vs actual behavior

Expected – The pull request is created successfully without errors.

Actual – The command aborts with
error fetching organization teams: GraphQL: Resource not accessible by integration (organization.teams).

Logs

[git remote -v]
[git config --get-regexp ^remote\..*\.gh-resolved$]
* Request at 2025-07-22 10:57:15.645353278 +0000 UTC m=+0.106273358
* Request to https://***/api/graphql
* Request took 196.853936ms
[git config --get-regexp ^branch\.chore/investigate-gh-cli-actions\.(remote|merge|pushremote|gh-merge-base)$]
* Request at 2025-07-22 10:57:15.846370735 +0000 UTC m=+0.307290806
* Request to https://***/api/graphql
* Request took 132.334393ms
* Request at 2025-07-22 10:57:15.980077053 +0000 UTC m=+0.440997115
* Request to https://***/api/graphql
* Request at 2025-07-22 10:57:15.980144083 +0000 UTC m=+0.441064143
* Request to https://***/api/graphql
* Request at 2025-07-22 10:57:15.980191129 +0000 UTC m=+0.441111171
* Request to https://***/api/graphql
* Request took 61.681612ms
* Request took 75.983812ms
* Request took 294.085325ms
error fetching organization teams: GraphQL: Resource not accessible by integration (organization.teams)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreThis issue is not accepting PRs from outside contributorsgh-prrelating to the gh pr commandp2Affects more than a few users but doesn't prevent core functions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions