GitHub App user access token: GET /user/teams stopped returning the user's organization
#214089
Replies: 3 comments 2 replies
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
That's why a PAT returns the organization and the app token doesn't. So when it "worked yesterday and not today", the organization side is the first suspect, not the app permissions. With the same user access token oauth2-proxy gets, check: # Is the org's installation still visible to this user token?
curl -s -H "Authorization: Bearer $UAT" https://api.github.com/user/installations \
| jq '.installations[] | {account: .account.login, suspended_at}'
# What does the token see for that org?
curl -s -H "Authorization: Bearer $UAT" https://api.github.com/user/memberships/orgs/YOUR_ORG | jq '{state, role, message}'
If you need it working right away: oauth2-proxy's GitHub provider also works with a classic OAuth App using the |
|
@berkantshn Hey, I just found the problem. It seems that Github randomly uninstalled the APP from our organization. There is NO audit log that says when it was uninstalled. This is definately a BUG from your side. |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
API
Body
A GitHub App user access token stopped including the caller's organization in
GET /user/teams. This worked on 2026-11-25. It fails on 2026-11-26. The app's permissions were not changed. The organization permissionMembersis Read.The caller is a member of the organization and of a team in that organization.
With a personal access token for the same user:
GET /user/orgsreturns the organizationGET /user/teamsreturns that organization and the user's teamsWith the user access token issued to the GitHub App during the OAuth callback,
GET /user/teamsdoes not include that organization.The client is oauth2-proxy v7.15.3 (
--provider=github, with an org and a team required). After the callback it callsGET /user/orgsandGET /user/teams(providers/github.go,getOrgsat line 480 andgetTeamsat line 532). It then fails withuser is missing required organization, which is the path that runs only when no returned team hasorganization.loginequal to the required org.GitHub's GitHub App permission docs do not list
GET /user/teamsorGET /user/orgsas GitHub App user-token endpoints. UnderMembersthey listGET /user/memberships/orgs/{org}andGET /orgs/{org}/teams. Those two calls are what this client uses, and they returned the organization yesterday.All reactions