Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ground Controller Lvl 1
Message 1 of 2

Requesting team name using GraphQL

Hi,

 

I am trying to get all requested reviewers from a review and according to the docs reviewer can either be a user or a team.

The issue is that when I request even the basic details for a team, I get the following error:

{
"data": null,
"errors": [
{
"message": "Your token has not been granted the required scopes to execute this query. The 'url' field requires one of the following scopes: ['read:org', 'read:discussion'], but your token has only been granted the: ['gist', 'repo'] scopes. Please modify your token's scopes at: https://ghe.labs.intellij.net/settings/tokens.",
"locations": [
{
"line": 20,
"column": 3
}
]
},
{
"message": "Your token has not been granted the required scopes to execute this query. The 'name' field requires one of the following scopes: ['read:org', 'read:discussion'], but your token has only been granted the: ['gist', 'repo'] scopes. Please modify your token's scopes at: https://ghe.labs.intellij.net/settings/tokens.",
"locations": [
{
"line": 21,
"column": 3
}
]
},
{
"message": "Your token has not been granted the required scopes to execute this query. The 'id' field requires one of the following scopes: ['read:org', 'read:discussion'], but your token has only been granted the: ['gist', 'repo'] scopes. Please modify your token's scopes at: https://ghe.labs.intellij.net/settings/tokens.",
"locations": [
{
"line": 2,
"column": 3
}
]
},
{
"message": "Your token has not been granted the required scopes to execute this query. The 'url' field requires one of the following scopes: ['read:org', 'read:discussion'], but your token has only been granted the: ['gist', 'repo'] scopes. Please modify your token's scopes at: https://ghe.labs.intellij.net/settings/tokens.",
"locations": [
{
"line": 20,
"column": 3
}
]
},
{
"message": "Your token has not been granted the required scopes to execute this query. The 'name' field requires one of the following scopes: ['read:org', 'read:discussion'], but your token has only been granted the: ['gist', 'repo'] scopes. Please modify your token's scopes at: https://ghe.labs.intellij.net/settings/tokens.",
"locations": [
{
"line": 21,
"column": 3
}
]
},
{
"message": "Your token has not been granted the required scopes to execute this query. The 'id' field requires one of the following scopes: ['read:org', 'read:discussion'], but your token has only been granted the: ['gist', 'repo'] scopes. Please modify your token's scopes at: https://ghe.labs.intellij.net/settings/tokens.",
"locations": [
{
"line": 2,
"column": 3
}
]
}
]
}

 

Why do I need the scopes to view the name of a team?

1 Reply
Community Manager
Message 2 of 2

Re: Requesting team name using GraphQL

This is because the names or even existence of teams is not public information. Members of the organization are  able to reference visible teams within the organization, but people outside the organization cannot. See About teams and Mentioning people and teams for more information.

 

I hope that helps!