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 / To get manager of auth...
Power Apps
Unanswered

To get manager of author created by

(0) ShareShare
ReportReport
Posted on by 480
In my powerapps form linked to sharepoint list, I am trying to check a condition where the manager of the created by person (author) of the list item and the current user is same or not.

To achieve this I used the formula :-


but i get the below error message -

Office365Users.Manager Failed: The method Manager has an invalid value for parameter userId



I even tried to use Office365Users.ManagerV2 - still the same.

Kindly help as I am very new to powerapps and in the learning process.
Screenshot_20190610_212726.jpg
Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @cyberco01 

     

    Can you update your expression as:
    If(If(!IsBlank(ThisItem.Author.Email),Office365Users.Manager(ThisItem.Author.Email).Mail = User().Email,true) || User().Email = "abc@xyz.com" || User().Email = "mno@xyz.com",Edit,View)
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Pstork1 Profile Picture
    69,581 Most Valuable Professional on at

    Where are you applying the formula?  I put essentially the same formula in the DisplayMode property on an EditForm Data Card and it worked fine.  It did give me an error before I ran it, but that was because the properties were empty prior to the first run.  Here's the formula I used.

    If(Office365Users.ManagerV2(ThisItem.'Created By'.Email).mail=User().Email||User().Email="xyz@company.com",DisplayMode.Edit,DisplayMode.Disabled)

    Note that I used 'Created By' rather than Author.  My list doesn't have an Author Field

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @cyberco01 how are you progressing with this? Were the above replies helpful? 

     

    @Anonymous 

  • cyberco01 Profile Picture
    480 on at

    Hi @Anonymous ,

    I applied the formula suggested by @Pstork1, I am yet to test it to confirm the same. I will surely close this once I am confirmed testing.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Pstork1 ,

     

    I tried below formula in the visible property of my datacard but it does not work.  I need to display the data card only for the manager of the List Item created user.

    If(User().Email=(Office365Users.Manager(ThisItem.'Created By'.Email).Mail),true, false)

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Pstork1 , Below is my error

    Office365Users.ManagerV2 failed: The method 'ManagerV2' has an invalid value for parameter 'id'

  • Pstork1 Profile Picture
    69,581 Most Valuable Professional on at

    Two suggestions.

     

    1) I would save the email address of the current user in the App OnStart. That will make the formulas more efficient

    Set(currentUser, User().Email)

     2) I would use this for the comparison in the visible property

    StartsWith(Office365Users.Manager(currentUser).Mail,currentUser)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Pstork1 ,

    In my scenario i need to store the email address of Author/Created By user of the list item(record) and not the logged in user.  I am stuck with syntax at that place.

     

  • Pstork1 Profile Picture
    69,581 Most Valuable Professional on at

    Sorry, I made a mistake in the function I gave you.  It should be

    StartsWith(Office365Users.Manager(ThisItem.'Created By'.Email).Mail,currentUser)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    No luck.  I am getting same message as before.

    Capture.PNG

     

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 333 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 86 Super User 2026 Season 1

Last 30 days Overall leaderboard