{"id":3056,"date":"2019-06-11T00:18:00","date_gmt":"2019-06-11T07:18:00","guid":{"rendered":"https:\/\/developer.microsoft.com\/en-us\/office\/blogs\/?p=3056"},"modified":"2019-06-11T00:18:00","modified_gmt":"2019-06-11T07:18:00","slug":"mail-search-folder-support-for-microsoft-graph-apis","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/mail-search-folder-support-for-microsoft-graph-apis\/","title":{"rendered":"Mail Search folder support for Microsoft Graph APIs"},"content":{"rendered":"<p>Today we\u2019re announcing the release of mail search folder APIs to the Microsoft Graph v1.0 endpoint. A mail search folder is a virtual folder in the user&#8217;s mailbox that contains all the email items matching a specified search criterion. A Microsoft Graph app can use this feature to quickly fetch all emails that match a predefined search criterion.<\/p>\n<p>We\u2019ve had several requests for this API, \u00a0and we can\u2019t wait to see what you\u2019ll create. These APIs are available today on the v1.0 endpoint as <a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/mailfolder-list-childfolders?view=graph-rest-1.0\">\/me\/messages\/mailfolders\/<\/a> and you can try them out using <a href=\"http:\/\/aka.ms\/ge\">Graph Explorer<\/a>.<\/p>\n<p><strong>Breaking change in the beta endpoint<\/strong><\/p>\n<p>Along with this release, we\u2018re making a minor name change to one of the <strong>mailSearchFolder<\/strong> properties on the beta endpoint. The <strong>sourceFolderIDs<\/strong> property on the <strong>mailSearchFolder<\/strong> resource has been renamed <strong>sourceFolderIds<\/strong>. This change is done in accordance with Microsoft Graph naming conventions and ensures consistency between the beta and v1.0 endpoints. If your app is using the beta endpoint to access <strong>mailSearchFolder<\/strong> functionality, it might break due to the property rename. We recommend that you update your app to use the new property name (<strong>sourceFolderIds<\/strong>).<\/p>\n<p><strong>Non-breaking additive changes to v1.0<\/strong><\/p>\n<p>We use additive changes as a mechanism to introduce new functionality in a non-breaking way and we recommend that you code your app to handle new properties gracefully. In this case, to support mail search folder scenarios, we have added a new entity type <strong>mailSearchFolder<\/strong> that derives from <strong>mailFolder<\/strong> entity type. The following new properties are unique to the <strong>mailSearchFolder<\/strong> entity type:<strong> isSupported, includeNestedFolders, sourceFolderIDs, filterQuery<\/strong>. These properties will be available when you call the mail folders API.<\/p>\n<p>Derived entities retain all the base entity properties but have their own @odata.type. In case your app is using an accept header to fetch additional OData metadata, the new returned @odata.type will be <strong>mailSearchFolder<\/strong> and not <strong>mailFolder<\/strong> for mail search folders.<\/p>\n<p>These changes are available today for your app to consume.\u00a0Please <a href=\"https:\/\/microsoftgraph.uservoice.com\/forums\/920506-microsoft-graph-feature-requests\">let us know<\/a> if you have additional feedback or suggestions for new functionality. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we\u2019re announcing the release of mail search folder APIs to the Microsoft Graph v1.0 endpoint. A mail search folder is a virtual folder in the user&#8217;s mailbox that contains all the email items matching a specified search criterion. A Microsoft Graph app can use this feature to quickly fetch all emails that match a predefined search criterion.<\/p>\n","protected":false},"author":69107,"featured_media":25159,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3],"tags":[12],"class_list":["post-3056","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-graph","tag-outlook"],"acf":[],"blog_post_summary":"<p>Today we\u2019re announcing the release of mail search folder APIs to the Microsoft Graph v1.0 endpoint. A mail search folder is a virtual folder in the user&#8217;s mailbox that contains all the email items matching a specified search criterion. A Microsoft Graph app can use this feature to quickly fetch all emails that match a predefined search criterion.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/3056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/69107"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=3056"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/3056\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/25159"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=3056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=3056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=3056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}