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).
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:
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.
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.
Check out how to claim yours today!
Check out new user group experience and if you are a leader please create your group
Test your skills now with the Cloud Skill Challenge.