Skip to main content
Authorize a Personal Access Token (PAT) with SAML so it can access organization-protected resources. Problem
  • When an organization enforces SAML SSO, API requests that use a PAT which hasn’t been authorized for that organization will be rejected with a 403 and an explanatory message.
Example unauthenticated request:
Example 403 response:
Cause
  • The PAT is valid, but GitHub prevents it from accessing organization-protected resources until the token is explicitly authorized for that organization via SAML SSO.
Fix — authorize the PAT for the organization
  1. Open GitHub and go to: Settings → Developer settings → Personal access tokens → Tokens (classic) (or the PAT page you used to create the token).
  2. Locate the token you used for the failing request.
  3. Click Configure SSO next to that token.
  4. In the Configure SSO flow, sign in with your organization credentials and complete any required 2‑factor authentication.
  5. Approve the organization authorization. Organization owners will be able to view the token’s scopes and last-used timestamp.
A dark-themed GitHub single sign-on authorization page prompting to authorize the organization "game-devstudio" with a green "Continue" button. The page also notes owners will be able to see the personal access token's access scopes and usage.
By authorizing the token with SAML, you allow that PAT to act on behalf of your identity for organization-protected resources. Organization owners will be able to view the token’s scopes and last-used timestamp.
Validate the authorization
  • After authorizing the token through the SSO dialog, re-run the same API request without changing the token. The request should now succeed and return the repository workflow runs.
Successful request example (headers shown):
Successful response example:
What to expect
  • After SSO authorization you should see workflow entries (for example, “Using Reusable CI Workflow” and “Using Composite Workflow” if present). This confirms the PAT is authorized to access organization-protected resources.
Quick reference table
Do not share your PAT. When you authorize a token for an organization, owners may view the token’s scopes and last-used timestamp. If a token is compromised, revoke it immediately from your Personal access tokens settings.
References Summary
  • A valid PAT may still be blocked from organization resources if SAML SSO is enforced. Authorize the PAT via the PAT page by using Configure SSO and completing the organization authorization. After authorization, API calls using that PAT will succeed for protected resources.

Watch Video