Context Settings - "Organization Admin Permissions Needed" - GraphQL Error

Hi, I’m receiving an “Organization Admin Permissions Needed” permissions error when attempting to modify my organization Context settings. I am an owner in the organization.

Digging in the console, I found a GraphQL request that errored.

Request URL: https://circleci.com/graphql-unstable
Request Method: POST
Status Code: 200 OK

{
  "operationName": "ContextsHmbQuery2",
  "variables": {
    "contextId": "[my-context-id]"
  },
  "query": "query ContextsHmbQuery2($contextId: ID!) {\n  context(id: $contextId) {\n    ...ContextHmb\n    __typename\n  }\n}\n\nfragment ContextHmb on ContextHmb {\n  id\n  name\n  createdAt\n  groups {\n    edges {\n      node {\n        ...SecurityGroups\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n  resources {\n    ...EnvVars\n    __typename\n  }\n  __typename\n}\n\nfragment EnvVars on EnvironmentVariable {\n  variable\n  createdAt\n  truncatedValue\n  __typename\n}\n\nfragment SecurityGroups on Group {\n  id\n  name\n  __typename\n}\n"
}

Error:

{"errors":[{"message":"Cannot query field `context' on type `QueryRoot'.","locations":[{"line":2,"column":3}],"extensions":{"field":"context","type":"QueryRoot"}}]}
3 Likes

I am getting the same error today.

I see the following in Settings > VCS.

GraphQL error: Cannot query field `organization' on type `QueryRoot'.

I am a GitHub org admin.

Hey prayashm,

Our Engineering team just deployed a fix. Can you confirm you are now able to view your VCS settings page? Thanks!

Angelisa Candler
Support Engineer @ CircleCI

@angelisa , yes it worked fine!

I used to have access to the Context section and now I’m also running into this “Organization Admin Permissions Needed” error.

I’m not an “Organization Admin”, but where I work, we use Github Teams to assign different permission scopes. And I do have Admin access to the repository in question where I want to add a new context and use it.

Now I can no longer access this organization section. And there’s no alternative for team scoped contexts. I’m only left out with old contexts that I can no longer update, and with the “regular” environment variables that I need to apply on a per-project basis. This doesn’t scale. I need to use the same context on more than 20 repos.

How can I achieve this? Asking for org-wide admin permission is not possible.

According to the docs, I should be able to create/see contexts as a “non-org admin” user. However, the dashboard shows me I’m not allowed.


image

Hi,
I seem to be having the same problem, and this is after the fix that @angelisa mentioned. Are you still having issues?

Hi @lbalmaceda! Thanks for your patience. I just came across this Support article and thought it might be related to your post if you’re still experiencing this problem!

Hi @scriptcoded! Are you using something like GitHub teams or are you an org admin?

Hi @thekatertot! I’m actually an org owner in GitHub. However, this morning it seems to work. Perhaps there is a window from adding the organization where things just don’t work?

I think there’s a few hours between changes in GitHub and the syncing of the API with our app. I’m glad it’s working now!

Thanks for the response. Looks like it got sorted out without action on my side. Probably an issue with the CircleCI dashboard/webapp.
I can confirm I’m able to do Context CRUD operations for my organization.
Cheers

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.