Forums

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

Hello how to get list of users i a group using groovy

Pantham Akhil
Contributor
September 4, 2022

Hello can someone help me in this how to get list of users i a group using groovy . 

 

Thanks,

Akhil

1 answer

7 votes
Satya Dusanapudi
Contributor
September 4, 2022

Hello Akhil, 

If it is Server/DC here is the script.

import com.atlassian.jira.component.ComponentAccessor

def groupManager = ComponentAccessor.getGroupManager()

String groupName = "confluence-administrators"

groupManager.getUsersInGroup(groupName)

The group  "confluence-administrators" you can change it to your desired group. Hope this will help you. 

 

Regards,

Satya

Pantham Akhil
Contributor
September 4, 2022

Hello Satya,

 

Thanks man it is working as expected. Thanks alot.

Thanks,

AK

Like Satya Dusanapudi likes this
Satya Dusanapudi
Contributor
September 4, 2022

I am glad it is working for. Cheers.

 

Regards,

Satya

Like # people like this

Suggest an answer

Log in or Sign up to answer