cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
omi18
Post Partisan
Post Partisan

Office 365 direct reports

Hello People,

 

I'm trying to retrieve managers email bassed on label text. But not able to get it. 

I'm using: directsreportsv2  function.

Any thoughts?

 

Thanks,

Omi

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @omi18 ,

Do you want to get your manager's email?

Please notice that: Office365Users.DirectReportsV2() function is to get the direct report of the specific user, not the specific user's manager data.

1)If you only want to get current user's email, using this formula is enough:

Office365Users.ManagerV2(User().Email).mail

2)If you want to get current user's Manger's   all user info , you should use formula like this:

Office365Users.DirectReportsV2(Office365Users.ManagerV2(User().Email).mail).value

Office365Users.DirectReportsV2() function could get more data than Office365Users.ManagerV2() function.

What's more, please notice that, using this formula, you will get a table with all managers.

You need to use formula like this to get specific email:

First(Office365Users.DirectReportsV2(Office365Users.ManagerV2(User().Email).mail).value).mail

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
rubin_boer
Super User
Super User

hi there

 

instead of using  label: this gets the logged in users manager: Office365Users.ManagerV2(User().Email).mail

its a good practice to use variables to be used in functions as oppose to label.text

 

the directreportsV2 will give all the emails of the users reporting to a given manager.

 

 

hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.
v-yutliu-msft
Community Support
Community Support

Hi @omi18 ,

Do you want to get your manager's email?

Please notice that: Office365Users.DirectReportsV2() function is to get the direct report of the specific user, not the specific user's manager data.

1)If you only want to get current user's email, using this formula is enough:

Office365Users.ManagerV2(User().Email).mail

2)If you want to get current user's Manger's   all user info , you should use formula like this:

Office365Users.DirectReportsV2(Office365Users.ManagerV2(User().Email).mail).value

Office365Users.DirectReportsV2() function could get more data than Office365Users.ManagerV2() function.

What's more, please notice that, using this formula, you will get a table with all managers.

You need to use formula like this to get specific email:

First(Office365Users.DirectReportsV2(Office365Users.ManagerV2(User().Email).mail).value).mail

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yutliu-msft 

 

Scenario: I have a combo box containing list names. When the user selects any name from the combo box, the label should give us the selected person manager name.

 

Let me know if you need more details.

 

Thanks,

Omi

 

Helpful resources

Top Solution Authors
Top Kudoed Authors
Users online (4,271)