Using a connect app with JWT authentication for api.atlassian.com, I have users who - according to role assignments - should be able to retrieve Assets information from the API. Instead I am seeing some unexpected responses from the API with a 403 status and I cannot determine why this is happening.
All examples use requests to the following URLs:
https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/objectschema/list
https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/object/{objectId}
object/{objectId} call is requesting an object in a particular schema where the role assignments are modified as explained in examples below.
User 1 is behaving as expected based on role assignments. User 2 is not. Both users are the same type (standard user, no admin permissions)
Examples:
-
User 1 without any role assignments within the schema settings:
objectschema/list: Returns only the schemas which the user can access
object/{objectId}: Returns 403 response code with error message âSorry, you do not have permission to perform this action.â -
User 1 assigned to âObject schema usersâ in the âusersâ selection within the schema settings:
objectschema/list: Returns only the schemas which the user can access, which now includes the schema they were given access to
object/{objectId}: Returns 200 response code with data -
User 2 without any role assignments within the schema settings:
objectschema/list: Returns 403 response code with error message âForbiddenâ
object/{objectId}: Returns 403 response code with error message âForbiddenâ -
User 2 assigned to âObject schema usersâ in the âusersâ selection within the schema settings
objectschema/list: Returns 403 response code with error message âForbiddenâ
object/{objectId}: Returns 403 response code with error message âForbiddenâ
Given the different error messages returned for the different users, it would seem that there is some other permission or setting associated with these requests that is preventing User 2 from retrieving details through the API, but I cannot determine what that might be.
Both users can see Assets from this schema when viewing Assets custom fields in work items, regardless of their schema role assignments. This problem appears to only impact API requests.