apioutlookmicrosoft-graph-api

Microsoft graph - outlook mail - list all mail folders (not just the top level ones)?


Currently, as far as I can tell, Microsoft graph offers 2 primary endpoints for outlook mail folders according to https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/message

List mail folders and List child folders - meaning just to build the folder hierarchy in my dashboard app, I need to make recursive REST API calls - which is very slow and very bad.

Is there any way to get microsoft to just return all folders at once?


Solution

  • No there isn't. You should check the childFolderCount property on each folder and only query if non-zero.