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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,569)