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 / Error message in the S...
Power Apps
Answered

Error message in the Staff Directory app in PowerApps.

(0) ShareShare
ReportReport
Posted on by 12

Hi Everyone,

 

I have a staff directory app, and it is connected to our Office.com & MS Teams. I build the Org chart in the Exchange server ( Organization > Manager), but I can't add anyone for our CEO since he doesn't have a manager. Here's the issue, when I search and click on his name in the app, it throws an error that this user doesn't have a manager. Here's the code

ClearCollect(Employee, ThisItem);
ClearCollect(PreviousEmployee, Employee);
Clear(Manager);Collect(Manager, Office365Users.Manager(First(Employee).Id));
Navigate(OrganizationScreen, Fade)

 

Here's the error message:

Office365Users.Manager failed: { "status": 404, "message": "No manager found for the specified user.\r\nclientRequestId: 4ace4eff-4622-456e-a4c1-e75ccaf9ef35", "error": { "message": "No manager found for the specified user." }, "source": "office365users-eus.azconn-eus-01.p.azurewebsites.net" }

 

 

I thought of adding an IF statement or sth that it doesn't throw an error message for the CEO user.

 

Thanks, 

 

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Oeskandarian :

    Firstly,let me explain why you encounted this problem.

    If the target user does not have a manager, then there will be such an error, and this error cannot be eliminated. In addition, there is no other way to directly obtain whether the user has manage. Currently I think the only way is based on the user’s jobtitle Determine whether he has manage.

    Secondly,the formula could be:

     

    ClearCollect(Employee, ThisItem);
    ClearCollect(PreviousEmployee, Employee);
    Clear(Manager);

    If(Office365Users.UserProfileV2(First(Employee).Id).jobTitle<>"CEO",

    Collect(Manager, Office365Users.Manager(First(Employee).Id)));
    Navigate(OrganizationScreen, Fade)

     

    Best Regards,

    Bof

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard