Forums

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

Jira Rest API: How to get a List of Projects for a specific User?

Jim Quitte
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 21, 2021

Hello! 

Is there a way (multiple calls are fine) to get a list of all Projects a particular User has access to using the Rest API?
Thanks in advance.

1 answer

1 accepted

0 votes
Answer accepted
Thomas Deiler
Community Champion
April 23, 2021

Dear @Jim Quitte ,

see my pseudo code:

projects = GET /rest/api/2/project

for (<PROJECT> in projects)
res = GET /rest/api/2/user/permission/search?username=<MYUSER>&projectKey=<PROJECT>&permission=BROWSE
if (res.HTTP_CODE = 200)
echo User <MYUSER> has access to <PROJECT>

Follow this for details on api call.

So long

Thomas

Bhagyashree Karale May 13, 2022

{'errorMessages': ['At least one permission name must be specified'], 'errors': {}}

This is what the response says

Like marcin.prokop likes this

Suggest an answer

Log in or Sign up to answer