Forums

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

LDAP Modify / bind with Scriptrunner - Experiences?

Lars Swart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 24, 2020

Hi,

I'm trying to use scriptrunner to write information into Microsofts Active directory. 

 

I got the connection working and can read information via LDAP.

 

Here is my groovy script for this, which I use in a Behaviour for a LDAP Picker Field:

-------------

import com.onresolve.scriptrunner.ldap.LdapUtil
import org.springframework.ldap.core.LdapTemplate
import org.springframework.ldap.core.AttributesMapper
import javax.naming.directory.SearchControls
import javax.naming.directory.Attributes
import javax.naming.directory.ModificationItem


def cnList = LdapUtil.withTemplate('LDAP') { template ->
template.search("", "(sn=Br*)", SearchControls.SUBTREE_SCOPE, { Attributes attributes ->
attributes.get('cn').get()
} as AttributesMapper<String>)
}

---------------

 

Now I'm trying to achieve modifying and binding via LDAP.

 

I'm not a very sophisticated developer, so I'm searching for examples in groovy.

Has anybody done something similar to this?

 

Have a nice day

Lars

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
Atlassian, Team '25 Europe, Atlassian conference, AI-powered teamwork, Atlassian events, keynote speakers, Barcelona tech conference, Atlassian Williams Racing, Carlos Sainz, Jenson Button, Mike Cannon-Brookes, Anu Bharadwaj, Atlassian Rovo

Atlassian Williams Racing is coming to Team '25 Europe 🏎️

Discover the teamwork and precision behind success on and off the track. See how this high-performing team makes the impossible possible. Be one of the first 100 customers to register for a chance to win 2 tickets to an Atlassian Williams 2026 race.

Register now
AUG Leaders

Atlassian Community Events