Access to /rest/align/api/2/Users
Asked by Wilson Lim:

Hello,

I am trying to access to API /rest/align/api/2/Users, but I am getting "403 *Undocumented"* error. I have System Role: Product Manager. What additional role/permission is needed to access /rest/align/api/2/Users for querying users and be able to update user roles?


Answers:
author: Benjamin
body: HI [@Wilson Lim](/t5/user/viewprofilepage/user-id/5279668) ,

Could be a number of things. Make sure the token you are using is correct and you are using the PUT for updated. As long as your permissions allow you to do those things in UI, should be ok for API calls.

Here's a similar post that goes over Jira Align Api User Management.

<https://community.atlassian.com/t5/Jira-Align-questions/Update-user-information-via-REST/qaq-p/2232905>

Hope this helps.

comments: author: Wilson Lim
body: Hi [@Benjamin](/t5/user/viewprofilepage/user-id/3275402),

I am able to execute /align/api/2/Users/whoami with the bearer token, so I don't believe there is issue with the token. My goal is to retrieve all the members of a specific team and update their role via REST API. I tried GET /align/api/2/Teams/{id} , it works, but it doesn't have team member information. So, I tried another route by querying GET /align/api/2/Users to fetch all users and their team membership information and got the "403" error. From JIRA Align UI, from the Teams UI, I am able to query the specific team and view Members of the team and I am able to update the team member's role. I am not sure what access/permission is missing on the REST API side. Any help would be appreciated.

Thanks,

Wilson


author: Rodrigo San Vicente
body: Hey [@Wilson Lim](/t5/user/viewprofilepage/user-id/5279668) !

In Jira Align the permissions are the same via UI or via API.

If you have access to view Users Records via UI (**Jira Align Administration** \> **ACCESS CONTROLS** section \> **People** ) you should run API Call on the**/rest/align/api/2/Users** endpoint.

If you don't have access via UI, some permission should be adjusted.

I hope it helps!  

Should you need any help with the above instructions, please kindly raise a JA support ticket using this [link](https://support.atlassian.com/contact/) and we'll be more than happy to assist you!


author: Ahmet Kilic
body: Hi [@Wilson Lim](/t5/user/viewprofilepage/user-id/5279668)

you have to have super admin right mainly to make some changes to users.

**1st check**: Login with your account into JA and try the same implementation you desire to do RestAPI.

Is it working as expected? Wenn yes, go on 2nd check.

**2nd check:**

1. Open up swagger
2. Adjust your instance URL:<https://your-jira-align-instance/rest/align/api/docs/index.html>
3. Apply your token
4. Run the Rest Call you desired

I hope this helps.

Warm regards,

Ahmet Kilic

Enterprise Agility Consultant at catworkx

comments: author: Wilson Lim
body: Hi [@Ahmet Kilic](/t5/user/viewprofilepage/user-id/4456960)

Thanks for the information. From JIRA Align UI, in the Teams UI screen, I am able to query the specific team and view Members of the team and I am able to update the team member's role. I am able to execute /align/api/2/Users/whoami, so not an issue with the token, it is just that when I tried querying GET /align/api/2/Users to fetch all users and their team membership information, I got the "403" error. I am not sure what access/permission is missing on the REST API side, maybe I do need to request for super admin access. Any help would be appreciated.

Thanks,

Wilson