We are converting from mail EWS into Microsoft office 365 Graph API,
I want to flat all my Folder tree into list of flat folders, so each entry in list should contain:
Folder:{parentId, myId} , ...
I saw in beta version there is an option to traverse with :
https://graph.microsoft.com/beta/me/mailFolders/inbox?$top=50&$expand=childFolders($levels=5)
but unfortunately I get only the first Level...
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users('4ed9f9bf-cfea-47de-ba2c-e4323d2dd600')/mailFolders/$entity",
"id": "AQMkAGM5MDIzODk0LTg2NgBjLTQxN2EtOTNmMC0wYWY4M2VkMTg1MWEALgAAAxfTs4ItP_BBtfaokkhWqiMBAJ1RfNBJd7VOqHUq_F8aPdIAAAIBDQAAAA==",
"displayName": "Inbox",
"parentFolderId": "AQMkAGM5MDIzODk0LTg2NgBjLTQxN2EtOTNmMC0wYWY4M2VkMTg1MWEALgAAAxfTs4ItP_BBtfaokkhWqiMBAJ1RfNBJd7VOqHUq_F8aPdIAAAIBCQAAAA==",
"childFolderCount": 1,
"unreadItemCount": 307,
"totalItemCount": 320,
"wellKnownName": "inbox",
"[email protected]": "https://graph.microsoft.com/beta/$metadata#users('4ed9f9bf-cfea-47de-ba2c-e4323d2dd600')/mailFolders('AQMkAGM5MDIzODk0LTg2NgBjLTQxN2EtOTNmMC0wYWY4M2VkMTg1MWEALgAAAxfTs4ItP_BBtfaokkhWqiMBAJ1RfNBJd7VOqHUq_F8aPdIAAAIBDQAAAA%3D%3D')/childFolders",
"childFolders": [
{
"id": "AAMkAGM5MDIzODk0LTg2NmMtNDE3YS05M2YwLTBhZjgzZWQxODUxYQAuAAAAAAAX07OCLT-gQbX2qJJIVqojAQCdUXzQSXe1Tqh1KvhfGj3SAAOojCnvAAA=",
"displayName": "LEVEL_1",
"parentFolderId": "AQMkAGM5MDIzODk0LTg2NgBjLTQxN2EtOTNmMC0wYWY4M2VkMTg1MWEALgAAAxfTs4ItP_BBtfaokkhWqiMBAJ1RfNBJd7VOqHUq_F8aPdIAAAIBDQAAAA==",
"childFolderCount": 1,
"unreadItemCount": 0,
"totalItemCount": 0,
"wellKnownName": null
}
]
}
Is there a good API either with O-Data or maybe other traversal algorithm (like in EWS - Deep traversal ) , so I can reduce my rest API calls ...
Thanks =]