API document link:
https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups/#api-v1-orgs-orgid-groups-search-post
We are getting the following error while calling the api and this error code is not specified in the api documentation .
{"errors": [{"code": "ADMIN-401-2","status": "401","title": "INSUFFICIENT_SCOPE","detail": "Insufficient scope. Create a new API Key for your Organization https://support.atlassian.com/organization-administration/docs/manage-an-organization-with-the-admin-apis/"}]}
Also,
we had created a API key long back and the API worked for the old key. But when the same user created another API key , the API did not work with the new API key. And got the same above error.
HI @Sumit Rajendra Athani
401 is permission error. The token/account you use do not have enough permission.
Regards
hey @Florian Bonniec , Where and how can we grant permission to the apiKey that is generated?
else how to generate token with correct permissions? because we are already org admin here when we created the api key.
https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups/#api-group-groups
on the same docs, other apis like get events, get orgs are working.
Hi @Sumit Rajendra Athani
As @Florian Bonniec mentions, what are the permission on the user related to the API token?
This user, will need to have Org admin permission to use this API endpoint.
You have to create a token for this purpose with an account that have org admin permission.
Manage an organization with the admin APIs | Atlassian Support
hi @Marc -Devoteam- , The user is org admin
Sumit, you are affected by this bug: https://jira.atlassian.com/browse/ID-8782Atlassian said they will be rolling a fix by Friday, but no guarantees.
It looks like you're new here. Sign in or register to get started.