Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Write the Office 365 Manager to a SharePoint Data List

I have a flow that uploads excel data to a SharePoint List. One of the columns is for an employee name/email and I want to write the given name Manager and Manager Email from Get Manager Action to the column Manager Name and Manager Email.
Also another requirement is to get the Manager( 2nd level mgr) of the Manager above( 1st level mgr) to write the results in the columns for Department Manager Name and Department Manager Email.
Hence I need to write the required name and email of two levels of manger in the SharePoint List.
What is the optimal solution for my flow? How do I get the name and email of the managers then convert it to string for data list input?
Advocate II
Advocate II

I've set up a test case for you:




Is this what you mean?


If the manager field is not configured the Get Manager action will fail. With a parallel action you can configure the run after propertie so you manage this scenario. 

Hi @dvdalen ,


Forgot to add in the excel upload there is an Employee Name or Email column, what I am trying to achieve is to get the Manager Name and Email of that employee. Then the result will be written to columns for Manager Name and Manager Email. 


After getting the 1st level manager from above requirement I need to get the 2nd level manager.That will be the Manager of the Manager of the employee then this will be written in columns for 2nd Level Manager Name and 2nd Level Manager email. To put it into context Get Manager info (Supervisor of the employee) then Get Manager info ( Line Manager of the Supervisor).

but what is the problem you experience? Is it the update list actions? I thought it was to get the details of the 2 managers.

@dvdalen how do I get the UPN of that employee then get Managet info then write it to sharepoint list?

Best practise is to use the email address as the upn, isn't that the case? You can check if you get results when you put the email adres in the Get user profile (V2) action and see if you get the result. 


If you do get the profile from the user you can then use the action Get manager (V2) and put the email adres as input as I did in my example. You can also use the Id field that you get from the Get user profile (V2) action as you can see in this example:


2019-04-25 08_04_26-Create your flow _ Microsoft Flow.png

Hi @dvdalen ,


For the Get Manager V2 to work is it always dependent to have Get User Profile V2 before the step?


Hence if I want to get the line manager of the manager should it be like this?


Employee > Get User Profile > Get Manager > Get User Profile > Get Manager



No that is not required. 


you only have to provide the get manager action the upn / email adres of the person that you want to have the manager from. As you can see in my example I checked the manager of the manager without a get user profile action in between.

@dvdalenbelow is what I have created. ManagerLookUp.png


What I am trying to achieve is upon importing the excel data table to SP Datalist the columns for the Employee's Supervisor Name and Supervisor Email columns will be populated with the use of Get User Profile. Aside from getting the Supervisor Name I need to also get the Name and Email to to whom Supervisor Reports to and write the result to Manager Name and Manager Email column. The error that I am getting is that I am having a bad request error.

Can you provide a picture of the last step create item

And a picture of the error you receive?


You do realize that your SharePoint list will be filled with double data? Every time you manually trigger this flow all the rows from the excel sheet will be imported in to the sharepoint list. 

Helpful resources

Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA 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 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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (12,266)