The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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.
👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.