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,

Report
All responses (
Answers (