Symptoms
gh repo list ORGexits 0 with no output (no error).gh api orgs/ORG/repos-> HTTP 403, 'Resource protected by organization SAML enforcement. You must grant your OAuth token access to this organization.'git ls-remote git@github.com:ORG/repo.git-> 'Repository not found' until the SSH key is SSO-authorized (github.com/settings/keys > Configure SSO), even with the right key.
What worked
gh api -i orgs/ORG | grep -i x-github-ssoreturns a per-token authorization_request URL. It changes on every call; give the user the latest.- SSH key SSO authorization took effect immediately; the gh OAuth token stayed blocked across
gh auth refreshand the user reporting org access granted in the GitHub CLI app settings (2026-11-01). Each token needs its own SSO grant; app-level org access isn't enough. - SSH can't list org repos. Don't brute-force names (the user objected); ask for the list, or grep a cloned repo for
ORG/references (found a sibling repo name that way).
Use
Any agent cloning a company org's repos on a dual-account machine (gh auth switch first).