Forums

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

「Grant user access」Organizations REST API returns "404 not found" error.

Masaki Suzuki
June 12, 2026

What I did.

・I got "accountId"(equals to "userId") of user account (existing at directory of my organization and it's status is "active") by calling 「Get users in an organization」Organizations REST API.

 

・I called 「Grant user access」Organizations REST API with setting the above "accountId" to "userId" path parameter, and collect values to another parameters("orgId" of path parameter, and "role" and "resource" at request body).

 

・All parameters including "userId" is collect, but「Grant user access」Organizations REST API retuens "404 not found" error, and the userId I set when caling this API and the one written in error message is different.

 

・I thought that "userId" and "accountId" may be different, but it's wrong. The "userId" and "accountId" is the same, because There are no APIs return "userId" parameter in it's response body, and Atlassian say "get userId by calling Get users in an organization API in official page."

 

Does anyone have the solution about this problem?  

 

3 answers

1 accepted

0 votes
Answer accepted
Marc -Devoteam-
Community Champion
June 12, 2026

Hi @Masaki Suzuki 

What API call are you executing and what documentation are you referring to?

Can you also provide details of the API call and the response?

Are you on Cloud or Data Center?

Marc -Devoteam-
Community Champion
June 15, 2026

Hi @Masaki Suzuki 

So the accountId you are using is not found, so this does not exist.

What is the accountId you get from: 

https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v2-orgs-orgid-directories-directoryid-users-get

userId and AccountId are the same in this.

Masaki Suzuki
June 18, 2026

Hi, @Marc -Devoteam- 

Regarding the issue (I previously reported as being caused by a bug in 「Grant user access」API) , I got message that this bug is fixed from Atlassian.

 

So, I called this API again using the the same processes as before, and confirmed that the granting user permission operation is executed successfully and returned no errors.

 

Therefore, I realized that this issue was not due to my methods or processes, but to a bug.

 

I sincerely appreciate your cooperation.

Thank you very much.

Like Marc -Devoteam- likes this
0 votes
Masaki Suzuki
June 15, 2026

Hi, @Marc -Devoteam- 

I just got the following response from Atlassian support team about this issue, and It turned out that this problem was caused by a bug of this API.  

 

So, I will tell the detail of this bug when I got the responce from Atlassian support team.

 


Dear Mr./Ms. Suzuki,

 

We apologize for the delay in addressing this matter.

 

Our team's investigation has revealed that the issue is due to a bug in the API.

We are currently working on a fix.

We will contact you as soon as there is any progress, so please wait.

 

Thank you for your continued support.


 

0 votes
Masaki Suzuki
June 14, 2026

Hi, @Marc -Devoteam- 

Thank you for your repponse, and sorry for lack of my information.

These are the details:

 

What API call are you executing and what documentation are you referring to?

API:「Grant user access」

Documentation URL: https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v1-orgs-orgid-users-userid-roles-assign-post

 

Can you also provide details of the API call and the response?

API Call is the following one:


curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <api_key>" -d '{"role": "atlassian/user", "resource": "<jira_resource_id>"}' https://api.atlassian.com/admin/v1/orgs/<org_id>/users/<user_account_id>/roles/assign


※set the accountId got from 「Get users in an organization」API at <user_account_id>.  

https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v2-orgs-orgid-directories-directoryid-users-get

 

Response is the following one:


{"errors":[{"id":"eefefdca-2fbe-4430-980b-49b636cccbd7","code":"ADMIN-UAM-404-1","status":"404","title":"Unknown Resource","detail":"User with id '712020:cb2d2b70-ce94-4413-b308-51c22e2a722e' not found"}]}


※'712020:cb2d2b70-ce94-4413-b308-51c22e2a722e' is the same value in case of any users.(different from <user_account_id>)

 

Are you on Cloud or Data Center?

Atlassian Cloud.

 

Best Regards.

Masaki Suzuki

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events