GitHub API: List a users teams within an organization

Is there an api call to list the teams a user is member of within an organization in the cloud?

:wave: Welcome!

Is this what you’re looking for?

No, with this request you can only see if a user is a member of a team.
I want to see which teams a user is a member of.



@kad-meedel You would need to take into consideration that you can hide your presence from being member of the organization.

There is an organization object in the Graphql API.

You can use our graphql explorer to try it out:

  organization(login: "ORGNAME") {
    teams(first: 20, userLogins: ["USERNAME"]) {
      edges {
        node {

Hello xknat, if you have selected the private setting, you wil allways be visible to other members of your organization. ( it is not displayed on your public profile )

Publicizing or hiding organization membership - GitHub Docs.

I know the option within graphql, but I want to use this in scripting.
Graphql is not easy to use in scripting with the use of variables.
I want to list all members of an organization and see if they have a team membership.

Hello, is there any solutions for this?