-
Type:
Bug
-
Resolution: Fixed
-
Priority:
High
-
Component/s: Directory - User Management REST API
-
Severity 3 - Minor
-
Warranty
Issue Summary
Atlassian recently released a few new REST API endpoints, one which is to grant users a product role to Atlassian Cloud Products: https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v1-orgs-orgid-users-userid-roles-assign-post
However, when using the endpoint for Bitbucket and Trello, it's returning the following error:
{"errors":[{"id":"xxx","code":"ADMIN-UAM-400-5","status":"400","title":"Empty/Invalid Resource","detail":"Cloud Resource is invalid"}]}
After investigation the issue, it looks like there's a bug which won't allow using the endpoint for Bitbucket and Trello.
Steps to Reproduce
- Run the call:
curl --request POST \ --url 'https://api.atlassian.com/admin/v1/orgs/{ORG_ID}/users/{AA_ID}/roles/assign' \ --header 'Authorization: Bearer API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "role": "atlassian/user-access-admin", "resource": "ari:cloud:bitbucket::workspace/80503244-856d-4e9c-ad2a-c0705657f02b" }'
2. Observe the error.
Expected Results
The user should be granted the role specified in the REST API Call.
Actual Results
The following error is returned:
{"errors":[{"id":"xxx","code":"ADMIN-UAM-400-5","status":"400","title":"Empty/Invalid Resource","detail":"Cloud Resource is invalid"}]}
Workaround
The only workaround is to grant the role through Atlassian Administration (admin.atlassian.com) until the problem is fixed.
- mentioned in
-
Page Loading...