Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Script Runner -- check if user on JIRA exists in active Directory (LDAP)

We have a requirement to change the assignee of unresolved issues to the project lead if the user is no longer present (quit the firm) on the Active Directory .

Our JIRA is setup for Internal with LDAP Authentication.

The above requirements can be broken into the following parts

1. Get all users from jira-software group  -- Done

2. Find the users within jira-software group have left the firm (not in AD)

3. Find unresolved issues assigned to them and update the assignee to project lead of the project under which the issue resides -- Done

 

Can someone provide any pointers with #2 ?  

Basically we need to query the LDAP to check for the user.

I see the following class has the methods to do so, but not sure how to get them during runtime

com.atlassian.crowd.directory.DelegatedAuthenticationDirectory

P.S: Able to get the Directory (class Directory) object which has the LDAP URL and other settings but not able to go to the DelegateAuthenticationDirectory from there.

Also, tried to query ldap using groovy-ldap, but after putting the 

groovy-ldap-1.0.2.jar file, into the web-inf/lib folder and restarting JIRA, the script is still not able to resolve the LDAP class file.

 

 

 

 

 

1 answer

Hello! I searched for the user in LDAP through javax.naming. You can find an example here.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

5 mobile apps for Jira Cloud to boost productivity

  It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...

216 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you