Hi,
We are trying to connect to our AD forest from the script console, to ultimately able to use the same code with Behaviors or a scripted field.
Anyway, we want to avoid copying Jars and the like, and we use groovyldap in the console, like this:
@GrabResolver(name='apache-snapshot', root='https://repository.apache.org/snapshots/')
@Grab(group='org.apache.directory', module='groovyldap', version='0.1-SNAPSHOT')
import org.apache.directory.groovyldap.LDAP
def lda_server = 'ldap://xxx.xxxx.net:389/DC=xx,DC=xx,DC=xx'
def ldap_user = 'xxx'
def ldap_password = 'xxxxxx'
def ldap = LDAP.newInstance(lda_server, ldap_user, ldap_password)
def result = ldap.searchUnique("cn=xxxx");
ldap.eachEntry ('(&(OU=xxxx,OU=xxxx))') { person ->
println "${person.displayName} (${person.cn})"
}
But sadly, we get an error 52e, and according to Atlassian doc, it means invalid credentials. But those credentials are valid when I query AD with ADBrowser.
groovyldap don't specify which auth mechanism it use, so maybe it`s using something else than simple? When using JNDI instead of grooyldap, we get this error:
javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.naming.java.javaURLContextFactory Root exception is java.lang.ClassNotFoundException: org.apache.naming.java.javaURLContextFactory
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
Jira Server 7.11.
Pascal were you ever able to figure this out? Thanks
Stand out as a skilled Confluence Cloud administrator. The Confluence Administration for Cloud certification proves you can configure permissions, manage site and space settings, and monitor activity—ensuring secure, effective collaboration for your team.
Start here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.