web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Getting my manager display name throws error

(0) ShareShare
ReportReport
Posted on by 1,110

I am retrieving my manager's display name into a label which is one of the fields on my form in canvas App. The formula am using is Office365Users.ManagerV2(Office365Users.MyProfileV2().mail).displayName. The result is coming up and being submitted to my data source. But after submission, an error pops up on the banner of the app saying "office365Users.ManagerV2 failed: The method 'ManagerV2' has an invalid value for parameter 'id'". Where am I doing wrong or is there an alternative?

 

Error1.JPG

I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,987 Moderator on at
    Re: Getting my manager display name throws error

    @RameshMukka

    To diagnose: put this code in the OnStart property of your app.

    Set(varUserEmail, Office365Users.MyProfileV2().mail)

     

    Then put this code in the Text property of a label you temporarily create for testing.

    varUserEmail

     

    Let me know the result.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • rameshmukka Profile Picture
    1,110 on at
    Re: Getting my manager display name throws error

    Thank you. Sure, I will try that. Can you tell me why is that required? The formula I mentioned itself isn't supposed to do the job?

  • rameshmukka Profile Picture
    1,110 on at
    Re: Getting my manager display name throws error

    I did exactly what you suggested. Now I get the error as soon as I launch the app. But good news is am always able to submit the form. Can you further help me?

  • mdevaney Profile Picture
    29,987 Moderator on at
    Re: Getting my manager display name throws error

    @RameshMukka 

    It definitely is supposed to do its job and not returning any email.  That is why we are troubleshooting 😉


    As a next step: could you could please try to obtain the User’s email by via this code instead:

     

    User().Email

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • rameshmukka Profile Picture
    1,110 on at
    Re: Getting my manager display name throws error

    I did try that in the mean time with the below formula.

     

    Office365Users.ManagerV2(User().Email).displayName

     

    The error was the same.

  • mdevaney Profile Picture
    29,987 Moderator on at
    Re: Getting my manager display name throws error

    @RameshMukka 
    If you type User().Email in Text property label does it show the email?

     

    Another idea is: can you confirm a Manager is assigned to your account in Office365?  This message could be occurring because there is no Manager.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

     

  • rameshmukka Profile Picture
    1,110 on at
    Re: Getting my manager display name throws error

    It does show my email on a label when I used the function user(). Email. 

    My Manager display name also populates. Doesn't it mean I have the manager assigned in Office 365?

     

    I also observed two different values for user().Email and Office365Users.MyProfileV2().mail. The values returned for both of these functions are not the same.

  • mdevaney Profile Picture
    29,987 Moderator on at
    Re: Getting my manager display name throws error

    @RameshMukka 
    Your could try Office365Users.MyProfileV2().userPrincipleName instead of Office365Users.MyProfileV2().mail.

     

    But yes, not having the manager in your Office365 account can cause the issue.  You can check it by storing Office365Users.MyProfileV2() in a variable and looking for the manager property.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • rameshmukka Profile Picture
    1,110 on at
    Re: Getting my manager display name throws error

    One quick question. I have 3 places am using this. Two times a label on my app and one time as field on my form. Where do you think this error is thrown on? Label or field? My bad, I am only changing label until now. My field in the form is still pointing to original formula.

  • mdevaney Profile Picture
    29,987 Moderator on at
    Re: Getting my manager display name throws error

    @RameshMukka 
    No clue.  Eliminate them one by one and experiment.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 624 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 384 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 246

Last 30 days Overall leaderboard