I have been using the Unified API lately, specifically the https://graph.microsoft.com/beta/me/Messages?$filter=IsRead eq false call.
What I want to achieve is to give the current user a count of how many unread mails they have in their inbox. The call above returns the unread messages and I can count them, BUT it also returns unread messages in the "Deleted Items" folder.
Using https://outlook.office365.com/api/v1.0/me/folders/Inbox/messages
I can filter by different folders, but using the Unified API it seems that all messages are mapped to the same parent folder? Atleast for me a message from "Inbox" has the same ParentFolderId
as a message in "Deleted Items".
Any ideas on how I can achieve my goal of providing the user with unread messages from the "Inbox" folder using the unified API?