Retrieve email address from different OU than username

MichaelK March 11, 2014

We have an unusual setup in our Active Directory where the user is kept in one OU with his corporate email address. His primary email (which is different from his corporate email) is stored in a different OU.

For example, their user credentials are in:

OU=Users,OU=DEPARTMENT,OU=DIVISION,OU=CORP,DC=ds,DC=company,DC=com

using this to get email gets the email address they are not supposed to use. We need to get that address from:

OU=CONTACTS,OU=MAIL ADDRESSES,OU=CORP,DC=ds,DC=company,DC=com

1 answer

0 votes
Tiago Comasseto
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.
March 12, 2014

Hi Michael, I don't see an option in JIRA to retrieve only the email address of an user from a different object in a different location in the LDAP.

One thing that you may consider if copy the real email from the OU=CONTACTS and paste it in a different attribute of the user object in OU=Users. For example copy it to the description attribute.

Then edit your LDAP configuration in JIRA to use the description attribute, instead of the current one.

Cheers

MichaelK March 12, 2014

That's a good suggestion and one I'm considering, but doing so requires cooperation from another deparment which I may or may not get. It also requires them to maintain that second address in two locations... an easy thing to miss.

Tiago Comasseto
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.
March 12, 2014

Hi Michael, I understand your concern, but I found in an online article that it could be done via powershell. You may like to see it in this link.

Cheers

Suggest an answer

Log in or Sign up to answer