cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate II
Advocate II

Getting Office365Users.Manager failed: The method 'Manager' has an invalid value for parameter 'userId' ONLY when running on Mobile

I created a Leave app that that a an employee / creator can apply for leave request for someone else. Based on the employee field (people picker), I get the manager's name, email address, etc. Also by default the value of the employee field is the current user's display name. I'm getting this error only when I am trying to open the app on mobile app. Except when app is being open in SharePoint and it works perfectly. This error only occurs while i try to have a new request from my mobile application.

"Office365Users.Manager failed: The method 'Manager' has an invalid value for parameter 'userId'" 

 

Please help. Thanks.

 

Image-9.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @kelomee ,

 

I make a test on my side, and the issue is confirmed.

Please try to use the following formula to modify yours.

 

If(!IsBlank(Employee field.Email), Office365Users.UserProfileV2(Employee field.Email).<property>)
If(!IsBlank(Employee field.Email), Office365Users.Manager(Employee field.Email).<property>

Then your issue would be fixed.

 

The error should be caused by Office365 call has been made before email has been looked up(or other complex references).

 

For more information, refer to these post:

The service returned an error: Office365Users!Manager

the service returned an error: Office365Users!UserProfile  

 

Best regards,

Sik

 

View solution in original post

5 REPLIES 5
Community Support
Community Support

Hi @kelomee ,

 

I make a test on my side, and the issue is confirmed.

Please try to use the following formula to modify yours.

 

If(!IsBlank(Employee field.Email), Office365Users.UserProfileV2(Employee field.Email).<property>)
If(!IsBlank(Employee field.Email), Office365Users.Manager(Employee field.Email).<property>

Then your issue would be fixed.

 

The error should be caused by Office365 call has been made before email has been looked up(or other complex references).

 

For more information, refer to these post:

The service returned an error: Office365Users!Manager

the service returned an error: Office365Users!UserProfile  

 

Best regards,

Sik

 

View solution in original post

Thanks Sik for your help. Yes it fixed my issue.

So if I have this code;

Office365Users.Manager(Office365Users.MyProfile().Id).DisplayName

Where do I put your code in then? 

Use this

 

If(!IsBlank(Office365Users.MyProfile().Id), Office365Users.Manager(Office365Users.MyProfile().Id).DisplayName)

Thanks, I had the same issue and this solution works for me.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (75,605)