cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PNWguy
Frequent Visitor

Query Active Directory

I loathe to hard code people's names into workflows, it just leads to heartache down the line.  How can I query active directory for the user account for a job title in Flow?  I'd really prefer to fire of an email from within a workflow to the Chief Executive Officer instead of coding Bill Lumbergh.

1 REPLY 1
Highlighted
Power Automate
Power Automate

Re: Query Active Directory

Not directly possible today.

 

But, if you are willing to go to the length of dabling around directly with APIs, you should be able to.  You need to call the following URL: https://graph.microsoft.com/v1.0/users?$filter=jobTitle eq 'CEO'

 

You can write a custom API to do the job.  See here: https://powerapps.microsoft.com/en-us/tutorials/register-custom-api/

 

You may also be able to achieve this using the HTTP+Swagger action as well.  See here: https://azure.microsoft.com/en-us/documentation/articles/connectors-native-http/#authentication

 

Of course, I havent tried either... just preaching here.  Let know if that works for you.  Would love to know what worked for you.

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,933)