cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DanielRK
Post Patron
Post Patron

Is there a way to get the email address for stipulated approvers from AD that have no hierarchical relationship to other approvers?

Hi,

 

I'm looking for a way to get an email address for a predefined approver's job title ("Chief Information Officer" for example) but this job title isn't anyone's manager in the flow so I can't use the office 365 user connector "get the manager".

 

I'm currently using a lookup function on a sharepoint list where I've listed these approvers based on their job title.

 

Is there an easier way to do it leveraging Active Directory? It will make maintenance a lot easier. 

 

Thanks a lot!

 

Regards,

 

Daniel 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@DanielRK 

No worries - sorry for delay.

 

The SearchUserV2 action does not search job titles.  So you really end up having to do this:

  LookUp(Office365Users.SearchUserV2({searchTerm:""}).value, JobTitle="CIO").Email

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

8 REPLIES 8
RandyHayes
Super User III
Super User III

@DanielRK 

It would make it easier if the information about hierarchy was in AD.  Otherwise you are forced to create your own list to keep track of it and then do it the way you are doing it.  If the information is not in AD, what other choice would you have?  

You could filter by job titles, but that might not be the accuracy you need.

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Hi @RandyHayes ,

 

Thanks for all your help. How would I get the information out of AD if it is there? 

 

Thanks again.

 

Regards,

 

Daniel

RandyHayes
Super User III
Super User III

@DanielRK 

Well, as you mentioned in your first post, you can get the manager of the user and keep working you way up that chain.  But, if in reality the CIO is not a manager to anyone, then you have to go about it the way you are or search for that title and get the user.  But that's a whole series of searching all users, getting job titles, then finding that job title, then looking up that person...that's a whole lot of steps.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Hi @RandyHayes ,

 

Thank again! You always help me tremendously.

 

Regards,

 

Daniel

Hi @RandyHayes ,

 

I know the job title for the person I'm looking for but want the corresponding email address as the output

 

I want to write it as a variable- 

 

Set(varCIO, office365users.SearchUser(V2)({searchTerm:"CIO"}).value, Email)

 

I think I'm writing it wrong as I'm getting an error. The Microsoft documentation doesn't really help as it shows how to get details about a user if you give it the user name but I'm trying to get the user email from their job title.

 

Thanks again Randy. Sorry to keep bugging you.

 

Regards,

 

Dan

RandyHayes
Super User III
Super User III

@DanielRK 

No worries - sorry for delay.

 

The SearchUserV2 action does not search job titles.  So you really end up having to do this:

  LookUp(Office365Users.SearchUserV2({searchTerm:""}).value, JobTitle="CIO").Email

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

Hi @RandyHayes ,

 

Thanks for getting back to me and for letting me know about this- Magic! Excited to give it a try. Will let you know when implemented.

 

Regards,

 

Dan

Thank you @RandyHayes ! This is exactly what I was looking for. I appreciate your help as always!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (44,127)