How to use get direct reports in an workflow

Iron Contributor


I have a flow that theoretically adds users from my Active Directory to a SharePoint list. This flow fires when you add a valid email to the list.


The problem is that the flow runs but it doesn't bring me any log, any ideas?


This is the workflow:


Screenshot 2022-04-08 132621.png


13 Replies

@ADumith the flow shown below worked fine for me and added the direct reports into a list with no problem, so you need to look at the initial trigger and also make sure the create item is selecting the correct dynamic content.




Los Gallardos
Microsoft Power Automate Community Super User

Thanks for your reply, I can't identify the first step of the flow, how do I place it in my PowerApp?

Hi @ADumith , if your aim is to capture all direct reports for an active account in a list you can do it like this, assuming you have a condition looking for AccountEnabled is true. I've tested this and it works well for me. The 'Create target user item' is not strictly necessary but I chose to keep a record of the email addresses I was entering during the test.





Hello @jonlake 


Thanks for reply.


I wondering, the steps Create target user item & Get direct report doesn't has any additional setting? 


Thanks again, 

Hi @ADumith, the actions don't have any additional settings. The 'Create target user item' isn't necessary, it's just my way of creating a separate audit record of the profile used by the Flow.

Hello @jonlake 


I apologize for being annoying, could you show me in an image how it would be?


I am a graphic person, so I learn more come.


Again, excuse me

Hi @ADumith , here is the simplified full Flow, with all it's actions (except the 'If no' action, which is empty for the purpose of this test, but you may want some sort of notification). The condition is evaluating the 'Account enable?' value from the 'Get user profile' action:




Hello @jonlake 


How you doing?


I wonder, Can you send me a copy about this workflow.


I got a confusion in the last step, what it's that one? Create item?




Thanks in advance,


Hi @ADumith , attached is a package containing the demo Flow.


Regards, Jon

Hello @jonlake,


To run the workflow I must have the list previously created, I wonder, could you tell me the fields of the list to create it?


Thanks in advance,



Hi @ADumith , I created a list called global_user_directory_direct_reports. The fields are as follows:



I renamed the Title field to line_manager, but you need to refer to the Title field in the Flow.

Hello @jonlake 


So, here we going.


First question: The workflow should populate the list, right?


Because I have ran twice and nothing coming up.



How can I get a whole report from my users, with out have to enter each email address?


Thanks in advance.

HI@ADumith , yes the workflow should populate the list, and does when I run it. It's possible your Azure Active Directory is setup differently and does not account for direct reports.


If you are wanting to loop through all users and capture any direct reports you will need a separate source. You can create one by extracting data from your global directory using something as simple as a MS Access database, linked to the client version of MS Outlook. You would then have your Flow get the items from the resulting source.


Precisely why your Flow isn't working is difficult to determine without seeing it, knowing that it works fine at my end capturing direct reports for a single user. If you can share some screen shots of the Flow actions (expanded) that may shed some light on the problem.


Regards, Jon