In this blog, we will discuss how to retrieve manager names using Microsoft flow and send manager display names in the email notification. We will also discuss how to solve them if any error occurred.
Follow the below steps to get the manager's name in the email notification.
Step 1
Open Flow.Microsoft.com and sign in with your office 365 credentials. Click on Create and then select instant flow.
Step 2
Give flow name, select manually triggered a flow, and click on create button.
Step 3
Click on the new step.
Step 4
Choose Operation, Get Manager V2.
Step 5
Add user email in textbox using dynamic content.
Step 6
Add a new step. Choose to send email option.
Step 7
Add manager, email in To option. Add manager display name in the body using dynamic content.
Step 8
Now click on the Save button. It will recommend testing the flow.
Step 9
Now test the flow manually.
Step 10
Continue the next button to run the flow.
Step11
Running the flow throws an error for me. It shows Resource manager does not exist.
Step 12
To resolve this issue, Go to admin, select Azure Active Directory
Step 13
Click on Users, In the Job Info section Manager Field was blank, Click on Change add the user name to be added as manager and save.
Step 14
Now go to My Flows. Run the flow again.
Step 15
Now the flow runs successfully.
Step 16
Go and check the email, you can see an email sent to the manager, email Id, and email body contains the manager display name.