You are viewing limited content. For full access, please sign in.

Question

Question

Dynamic AD User Email

asked on February 20, 2018

Hello All,

 

I was hoping someone could help me out with this and the best way to accomplish it.  I am working on a Workflow that would alert a person to a document that is awaiting their approval.  However, I do not want this to be based on a static list, I would like to base it on AD users.  Is there a good way to take a field such as a user's last name, look up the last name in AD to find the AD user, and email that user based on that information?  

0 0

Replies

replied on February 21, 2018

The Find User activity only searches one field and only returns the first value found.  In order to search both first and last name, you would have to combine them in a token first and try to match them against either Account Name or Display Name depending on how your AD is set up.  For example, our Account Name is a user ID so first and last name would not work for that search.

You would also have to watch out for no matches.  For example, John Doe might go by Johnny and using a token would do a search on Doe Johnny and no results would show up.

One alternative you might have would also be building the email address in a token, depending on your emails.  For example, our emails are lastname.firstname@... so I could use the first and last name to "build" them email in a token.  Something like %(RetrieveFields_LastName).%(RetrieveFields_FirstName)@...

This method would have the same issue as AD as far as nicknames being used.  But it might be an alternative to look at.

 

1 0
replied on February 21, 2018

Thanks, Jennifer!  This will help me quite a bit

0 0
replied on February 20, 2018

How do you determine who the email goes too?  Is it in the metadata?  Something like if Field X (say amount) = Value Y (say $500) then send email to Person Z (say Jane Doe)?

Looking up by just last name could cause issues if you have more than one person with the same last name.

 

0 0
replied on February 21, 2018

Yes, it will be in the metadata so I can check both the last name and the first name before looking up the AD user.  

0 0
replied on February 20, 2018

You can create a trustee provider for your AD and then user Find User to look up email addresses or other user properties.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.