Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can we access multiple organisations using one API Token?

sam saas November 24, 2020

The Get Organisations API here : https://developer.atlassian.com/cloud/admin/organization/rest/api-group-orgs/#api-orgs-get

says it gets a list of organisations.

However when we create a API token following this : https://confluence.atlassian.com/cloud/create-an-admin-api-key-969537932.html
it lands up on a page to select the organisation, and creates API TOKEN for that specific organisation only.

Is it possible that we have a single token for all organisations?

2 answers

1 accepted

0 votes
Answer accepted
Dave Meyer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 24, 2020

@sam saas Admin API keys are scoped to a single organization (they can be used by multiple users since they are owned by the organization, not any individual user).

That said, most administrators only administer a single organization, since an organization is typically mapped to a company, and most people only work for a single company 🙂

What's driving your requirement to use a single API key for multiple organizations?

sam saas November 24, 2020

Hi @Dave Meyer 
Thanks for clarifying the scope of the Admin Key ! 

I was checking the APIs available for orgs when I came across this:  https://developer.atlassian.com/cloud/admin/organization/rest/api-group-orgs/#api-orgs-get

And I also get the same response as @Prince Nyeche  has mentioned in the reply above for the get orgs endpoint. That was the reason why I wanted to check if there is a possibility of having multiple organisations mapped to single Admin API key and the get orgs endpoint would be used to get all orgs (based on the API token) as it mentions.

Can you please help me understand what response should we be expecting from this API, as currently it returns an empty response with 200 status code?





Dave Meyer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 25, 2020

@Prince Nyeche @sam saas Thanks both for your clarifications, I understand the confusion now. I think the error is that this shouldn't be listed as a public API in our documentation – the only place I'm aware of where we present the data that this API endpoint returns is when you land directly on admin.atlassian.com and are presenting with the list of orgs you administer.

When you create the org API token, we also provide your orgId value. You can see that every other API in the group except for that one takes an orgId in the path.

I created a bug report here: https://jira.atlassian.com/browse/ACCESS-966 

Also just a quick note: usage of this API doesn't strictly require an Atlassian Access subscription, only some of the endpoints that return data from Access features (like the audit log endpoint).

Prince Nyeche
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 25, 2020

Thanks @Dave Meyer  for the clarification and the open bug ticket, that's very helpful.

sam saas November 25, 2020

Thanks @Dave Meyer !!
This is really helpful !

0 votes
Prince Nyeche
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 24, 2020

Hi @sam saas 

The Docs mentioned "0 or more values of Org are returned" with that API. I don't particularly think the Org Id matters when creating the API. It just denotes where the API was generated. However I noticed that it returns an empty list instead with a 200 Status code. Which to me means that the API may not be working properly as I have Atlassian Access in only 1 of my Org. 

So to answer your question, the API once generated should work across all Org that you are on as an Org Admin. I don't think that it matters on what Org the API is generated on.

Dave Meyer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 24, 2020

@Prince Nyeche can you double-check whether you're using a personal API token (tied to your Atlassian account) or an Admin API key (which is associated to an organization and must be created by an organization admin).

You're correct that a personal API token should work across all products you have access to, but an Admin API key is scoped to a single organization.

Prince Nyeche
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 24, 2020

Hi @Dave Meyer 

Yes, I'm using the Org Admin API generated from here, and not the Personal API token from id.atlassian.com. Likewise API works if I'm using other endpoints, however this is the result I get when I use this endpoint to get Orgs

{"data":[],"links":{"self":"https://api.atlassian.com/admin/v1/orgs"},"meta":null}

So i'm not certain why it will show an empty list or maybe something else is wrong somewhere.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events