How remov users from project

Olexandr Babych February 22, 2024

Hello, everyone!


I can't find a solution for this:

In our company, we use group policies for access to all projects. To grant access to a project, a user must contact the administrator to be added to the necessary group. However, in some projects where users have the "Administer Project - Ability to administer a project in Jira" permission, some users abuse their permissions by adding other users to the project without contacting the Jira administrator.

I want to write a script using REST API that can clear all users in all projects who were added without a group. How can I do it?

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 22, 2024
Olexandr Babych February 22, 2024

yea, i checked it. 

but i can`t find anything was can help me with my problem 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 23, 2024

This post identifies an api that will give you all the people and groups assigned to a specified role in a specified project.

https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-roles/#api-rest-api-2-role-id-get

It will return output that lists each group assigned to the role and each individual assigned to the role. 

If you parse the output, then you could use this API to remove a user from a role in a specific project.

https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-role-actors/#api-rest-api-2-project-projectidorkey-role-id-delete

Like Jehan Bhathena likes this
Olexandr Babych February 25, 2024

@Trudy Claspill Thank you very much <3

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events