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?
@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."
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?
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?
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
I did try that in the mean time with the below formula.
Office365Users.ManagerV2(User().Email).displayName
The error was the same.
@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.
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.
@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.
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.
@RameshMukka No clue. Eliminate them one by one and experiment.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 757 Most Valuable Professional
Michael E. Gernaey 322 Super User 2025 Season 2
MS.Ragavendar 209 Super User 2025 Season 2