Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,245
Community Members
 
Community Events
165
Community Groups

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

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 Leader Apr 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

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

This is what the response says

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you