Forums

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

How to get all organizations from Atlassian with API?

Seikyo Cho April 9, 2024

If get organization in a solid subdomain, this way works:

curl --request GET \
--url 'https://mysubdomain.atlassian.net/rest/servicedeskapi/organization' \
--user 'my@email.com:<access_token>' \
--header 'Accept: application/json'

But this way doesn't work:

curl --request GET \
--url 'https://api.atlassian.com/admin/v1/orgs' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'

Also this way doesn't work:

curl --request GET \
--url 'https://api.atlassian.com/admin/v1/orgs' \
--user 'my@email.com:<access_token>' \
--header 'Accept: application/json'

The error code is:

{"code":401,"message":"Unauthorized"}

The access token was created on this page:
https://id.atlassian.com/manage-profile/security/api-tokens

Why it doesn't work?

1 answer

1 vote
Mohanraj Thangamuthu
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 9, 2024

Hello, Good day. The access token that you are using will not help on Org level. Try the token suggested on following link https://support.atlassian.com/organization-administration/docs/manage-an-organization-with-the-admin-apis/

Seikyo Cho April 10, 2024

@Mohanraj Thangamuthu 

Thank you.

This way can get organization data from one special organization. But if I have multiple organizations on this page:

https://admin.atlassian.com/

How can I get all of them with API?

Suggest an answer

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

Atlassian Community Events