cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JHS2020
Helper V
Helper V

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

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

1 ACCEPTED SOLUTION

Accepted Solutions
JHS2020
Helper V
Helper V

It does not show the red error anymore when using:

 

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

View solution in original post

10 REPLIES 10
mdevaney
Super User
Super User

@JHS2020 

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

@mdevaney  The same error occurs 

@JHS2020 

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

@mdevaney  It is giving me my email address 

@JHS2020

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

@JHS2020 

 

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

The user, aka. me is assigned the manager

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

JHS2020
Helper V
Helper V

It does not show the red error anymore when using:

 

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

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

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