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 / Function 'manager' has...
Power Apps
Unanswered

Function 'manager' has some invalid arguments + name isn't valid in Request Leave App

(0) ShareShare
ReportReport
Posted on by 5

Hi Community,

 

I am building a request leave app in PowerApps through using a standard template. On the opening screen the approver of the user has to be set, but the part in red gives a warning:

 

//whenever user navigates to this page, set their approver to their manager
Set(_selectedApprover, Office365Users.Manager(_myProfile.Id));
Set(_selectedApproverPhoto, If(Office365Users.UserPhotoMetadata(_selectedApprover.Id).HasPhoto, Office365Users.UserPhoto(_selectedApprover.Id)))

 

1. Function 'manager' has some invalid arguments

2. Name isn't valid. This identifier isn't recognised.

 

Can someone explain what I do wrong?

 

 

Categories:
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @FMeijer ,

    Could you tell me the value of "_myProfile.Id"?

    Please make sure that this "_myProfile.Id" will return User principal name or email id.

    Could you tell me the two error message come from which formula?

    Please check the value of _selectedApprover.

    If this variable didn't been saved successfully, the second formula will not work.

     

    Here are some doc about how to use these functions for your reference:

    https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/How-do-I-use-the-the-Office365Users-quot-UserPhoto-quot-option/td-p/64960

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections/connection-office365-users

    https://powerusers.microsoft.com/t5/Creating-Apps/Office365Users-UserPhotoMetaData-error/td-p/169107

     

    Best regards,

     

  • FMeijer Profile Picture
    5 on at

    Hi @v-yutliu-msft ,

     

    Thanks for your reply and sorry for my late reply. I found out that in our Azure Directory, the role of manager was not specified. We fixed this, so now this error does not show up anymore.

     

    Have a great day!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard