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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Office365Users.Manager...
Power Apps
Answered

Office365Users.Manager failed: The method "manager" has an invalid value for parameter "userid"

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

I am getting this error

PA1.JPG

When I am using this code
PA2.JPG

 

Can anybody help out with the problem. I have tried a lot of things, but nothing seems to solve it. 
I recieve the right text from it, but keep getting the error

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @Anonymous 

    Can you please try replacing this code

    Office365Users.MyProfile().Mail

     

    With this code 

    Office365Users.MyProfile().Id

     

    ---
    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."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @mdevaney  The same error occurs 

  • mdevaney Profile Picture
    29,993 Moderator on at

    @Anonymous 

    Can you please put this code in the Text property of a label and let me know the result?  This will show us what information is being passed in your formula.

     

    Office365Users.MyProfile().Mail

     

     

    ---
    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." 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @mdevaney  It is giving me my email address 

  • mdevaney Profile Picture
    29,993 Moderator on at

    @Anonymous

    From our testing I think your code is correct and your profile's email is configured correctly.  I think what is happening is the Manager's email is being called before the email is found by MyProfile.  We will need to try a few things.

     

    Please put this code in the OnStart property of your app

    Set(myEmailAddress, User().Email)

     

    Then replace  

    Office365Users.MyProfile().Mail

     

    With this code

    myEmailAddress

     

    ---
    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."

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    @Anonymous 

     

    Please go to Azure AD to check if the user has assigned the Manager. If the user doesn't have the Manager, the function will return the Error. 

    Also, you can change another user who has been assigned a Manager and try again to see if the error is gone.

    Snipaste_2020-02-10_17-38-51.png

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    The user, aka. me is assigned the manager

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Sorry the late answer, but this solution does not work either

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It does not show the red error anymore when using:

     

    Office365Users.Manager(User().Email).DisplayName

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Don't panic!

    Simple Enable this:
    Go to
    «Experimental features section» -> Enable «Formula-level error management»

    and Use this Formula: IfError(Office365Users.ManagerV2(User().Email).displayName,"");

    was glad to help 😊

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard