Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Error in search groups API: This is in Atlassian admin api

Sumit Rajendra Athani November 19, 2024

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.

3 answers

0 votes
Paulo Ramalho
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 20, 2024

Sumit, you are affected by this bug: https://jira.atlassian.com/browse/ID-8782

Atlassian said they will be rolling a fix by Friday, but no guarantees.

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 19, 2024

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.

Sumit Rajendra Athani November 19, 2024

hi @Marc - Devoteam , The user is org admin

0 votes
Florian Bonniec
Community Champion
November 19, 2024

HI @Sumit Rajendra Athani 

 

401 is permission error. The token/account you use do not have enough permission.

 

Regards

Sumit Rajendra Athani November 19, 2024

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.

 

 

Sumit Rajendra Athani November 19, 2024

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. 

 

Florian Bonniec
Community Champion
November 19, 2024

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

 

Regards

Sumit Rajendra Athani November 19, 2024

Hi @Florian Bonniec , the token was created with an org admins account itself. And as mentioned the api worked with an older apikey, but failed with an new apikey when created by the same user as previous. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events