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

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.

 

 

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

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

Announcements
PA 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

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

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

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (74,602)