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
Community Members
Community Events
Community Groups

Scriptrunner add LDAP user to group

 if my Jira server user Directory is using LDAP. What will be the best way to :



"message":"org.springframework.transaction.CannotCreateTransactionException: Could not create DirContext instance for transaction; nested exception is org.springframework.ldap.CommunicationException
Root exception is java.lang.ClassNotFoundException:

1 answer

Try this...


import com.atlassian.jira.component.ComponentAccessor

def username = "user1"
def group ="groupA"
def addtouser = ComponentAccessor.getUserManager().getUserByName(username)
def grouptoadd = ComponentAccessor.getUserManager().getGroup(group)


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Online AMA this week: Your project management questions answered by Jira Design Lead James Rotanson

We know that great teams require amazing project management chops. It's no surprise that great teams who use Jira have strong project managers, effective workflows, and secrets that bring planning ...

179 views 1 6
Read article

Atlassian Community Events