{"id":1581,"date":"2017-10-09T13:41:12","date_gmt":"2017-10-09T13:41:12","guid":{"rendered":"https:\/\/developer.microsoft.com\/en-us\/office\/blogs\/?p=1581"},"modified":"2017-10-09T13:41:12","modified_gmt":"2017-10-09T13:41:12","slug":"new-outlook-apis-in-the-microsoft-graph-rooms-rules-categories-headers-and-time-zones","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/new-outlook-apis-in-the-microsoft-graph-rooms-rules-categories-headers-and-time-zones\/","title":{"rendered":"New Outlook APIs in the Microsoft Graph: rooms, rules, categories, headers, and time zones"},"content":{"rendered":"<p>In June, we <a href=\"https:\/\/blogs.msdn.microsoft.com\/exchangedev\/2017\/06\/30\/announcing-new-rest-apis-in-beta-for-rooms-time-zones-and-languages\/\">announced new APIs<\/a> in the beta endpoint of the Outlook REST API. Today we&#8217;re excited to announce that those APIs have been added to the Microsoft Graph, along with some other highly-requested APIs. All of these new APIs are added to the beta version of the Microsoft Graph API.<\/p>\n<p>Try these new APIs out today, either in your code or in the <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/graph-explorer\">Graph Explorer<\/a>. Leave feedback on the new APIs on <a href=\"https:\/\/officespdev.uservoice.com\/\">UserVoice<\/a>.<\/p>\n<h2 id=\"rules\">Rules<\/h2>\n<p>The Microsoft Graph API has added mailbox rule support via the Rules API. By using this API, apps can now <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/api-reference\/beta\/api\/mailfolder_list_messagerules\">list a user&#8217;s rules<\/a> and <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/api-reference\/beta\/api\/mailfolder_post_messagerules\">create new rules<\/a>.<\/p>\n<h3 id=\"get-rules\">Get inbox rules<\/h3>\n<p><strong>Request<\/strong><\/p>\n<pre>GET https:\/\/graph.microsoft.com\/beta\/me\/mailFolders\/inbox\/messagerules\n<\/pre>\n<p><strong>Response<\/strong><\/p>\n<pre>{\n  \"value\": [\n    {\n      \"id\": \"AQAAAPUfKuc=\",\n      \"displayName\": \"Chris Gray\",\n      \"sequence\": 1,\n      \"isEnabled\": true,\n      \"hasError\": false,\n      \"isReadOnly\": false,\n      \"conditions\": {\n        \"fromAddresses\": [\n          {\n            \"emailAddress\": {\n              \"name\": \"Chris Gray\",\n              \"address\": \"chrisg@contoso.onmicrosoft.com\"\n            }\n          }\n        ]\n      },\n      \"actions\": {\n        \"moveToFolder\": \"AAMkAGZj....\",\n        \"stopProcessingRules\": true\n      }\n    }\n  ]\n}\n<\/pre>\n<h3 id=\"create-rules\">Create inbox rule<\/h3>\n<p><strong>Request<\/strong><\/p>\n<pre>POST https:\/\/graph.microsoft.com\/beta\/me\/mailFolders\/inbox\/messagerules\n\n{    \n  \"displayName\": \"From partner\",    \n  \"sequence\": 2,    \n  \"isEnabled\": true,      \n  \"conditions\": {\n    \"senderContains\": [\n      \"adele\"     \n    ]\n   },\n   \"actions\": {\n    \"forwardTo\": [\n      {\n       \"emailAddress\": {\n        \"name\": \"Alex Wilbur\",\n        \"address\": \"AlexW@contoso.onmicrosoft.com\"\n        }\n       }\n    ],\n    \"stopProcessingRules\": true\n   }  \n}\n<\/pre>\n<p><strong>Response<\/strong><\/p>\n<pre>{\n  \"id\": \"AQAAAPUfKuk=\",\n  \"displayName\": \"From partner\",\n  \"sequence\": 2,\n  \"isEnabled\": true,\n  \"hasError\": false,\n  \"isReadOnly\": false,\n  \"conditions\": {\n    \"senderContains\": [\n      \"ADELE\"\n    ]\n  },\n  \"actions\": {\n    \"stopProcessingRules\": true,\n    \"forwardTo\": [\n      {\n        \"emailAddress\": {\n          \"name\": \"Alex Wilbur\",\n          \"address\": \"AlexW@contoso.onmicrosoft.com\"\n        }\n      }\n    ]\n  }\n}\n<\/pre>\n<h2 id=\"categories\">Categories<\/h2>\n<p>The Microsoft Graph API has added access to the master categories list in a user&#8217;s mailbox via the Categories API. By using this API, apps can now <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/api-reference\/beta\/api\/outlookuser_list_mastercategories\">get the user&#8217;s master category list<\/a> and <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/api-reference\/beta\/api\/outlookuser_post_mastercategories\">add new categories<\/a>.<\/p>\n<h3 id=\"get-categories\">Get master category list<\/h3>\n<p><strong>Request<\/strong><\/p>\n<pre>GET https:\/\/graph.microsoft.com\/beta\/me\/outlook\/masterCategories\n<\/pre>\n<p><strong>Response<\/strong><\/p>\n<pre>{\n  \"value\": [\n    {\n      \"id\": \"24ed9127-fe16-412d-9870-5efea8a2e8fc\",\n      \"displayName\": \"Red category\",\n      \"color\": \"preset0\"\n    },\n    {\n      \"id\": \"7fd099e2-7526-4edf-98e8-35ce90277496\",\n      \"displayName\": \"Orange category\",\n      \"color\": \"preset1\"\n    },\n    ...\n  ]\n}\n<\/pre>\n<h3 id=\"get-categories\">Create category<\/h3>\n<p><strong>Request<\/strong><\/p>\n<pre>POST https:\/\/graph.microsoft.com\/beta\/me\/outlook\/masterCategories\n\n{\n  \"displayName\": \"Project expenses\",\n  \"color\": \"preset9\"\n}\n<\/pre>\n<p><strong>Response<\/strong><\/p>\n<pre>{\n  \"id\": \"2393a824-ec66-46fb-88c3-5b455474d57c\",\n  \"displayName\": \"Project expenses\",\n  \"color\": \"preset9\"\n}\n<\/pre>\n<h2 id=\"message-headers\">Message headers<\/h2>\n<p>The Microsoft Graph API has added the RFC5322 message headers to the <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/api-reference\/beta\/resources\/message\">message resource<\/a>. The headers are available in the <code>internetMessageHeaders<\/code> property, which is a collection of <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/api-reference\/beta\/resources\/internetmessageheader\">internetMessageHeader resources<\/a>. The <code>internetMessageHeaders<\/code> property is not in the default property set for messages, so you must request it explicitly using the <code>$select<\/code> query parameter.<\/p>\n<h3 id=\"get-message-headers\">Get message headers<\/h3>\n<p><strong>Request<\/strong><\/p>\n<pre>GET https:\/\/graph.microsoft.com\/beta\/me\/messages\/{message-id}?$select=subject,internetMessageHeaders\n<\/pre>\n<p><strong>Response<\/strong><\/p>\n<pre>{\n  \"id\": \"AAMkAGZj...\",\n  \"subject\": \"Vacation request\",\n  \"internetMessageHeaders\": [\n    {\n      \"name\": \"MIME-Version\",\n      \"value\": \"1.0\"\n    },\n    {\n      \"name\": \"Date\",\n      \"value\": \"Wed, 4 Oct 2017 10:32:27 -0400\"\n    },\n    ...\n  ]\n}\n<\/pre>\n<h2 id=\"meeting-rooms\">Meeting rooms<\/h2>\n<p>The previously announced Rooms API from the Outlook endpoint is now available on the Microsoft Graph. We&#8217;ve added the ability to find both <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/api-reference\/beta\/api\/user_findrooms\">rooms<\/a> and <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/api-reference\/beta\/api\/user_findroomlists\">room lists<\/a>.<\/p>\n<h3 id=\"get-room-lists\">Get room lists<\/h3>\n<p><strong>Request<\/strong><\/p>\n<pre>GET https:\/\/graph.microsoft.com\/beta\/me\/findroomlists\n<\/pre>\n<p><strong>Response<\/strong><\/p>\n<pre>{\n  \"value\": [\n    {\n      \"name\": \"Building 1 Rooms\",\n      \"address\": \"Building1Rooms@contoso.onmicrosoft.com\"\n    },\n    {\n      \"name\": \"Building 2 Rooms\",\n      \"address\": \"Building2Rooms@contoso.onmicrosoft.com\"\n    }\n  ]\n}\n<\/pre>\n<h3 id=\"get-rooms\">Get rooms<\/h3>\n<p><strong>Request (all rooms)<\/strong><\/p>\n<pre>GET https:\/\/graph.microsoft.com\/beta\/me\/findrooms\n<\/pre>\n<p><strong>Request (rooms in a room list)<\/strong><\/p>\n<pre>GET https:\/\/graph.microsoft.com\/beta\/me\/findrooms(roomlist='Building1Rooms@contoso.onmicrosoft.com')\n<\/pre>\n<p><strong>Response<\/strong><\/p>\n<pre>{\n  \"value\": [\n    {\n      \"name\": \"Conf Room Adams\",\n      \"address\": \"Adams@contoso.onmicrosoft.com\"\n    },\n    {\n      \"name\": \"Conf Room Crystal\",\n      \"address\": \"Crystal@contoso.onmicrosoft.com\"\n    },\n    {\n      \"name\": \"Conf Room Stevens\",\n      \"address\": \"Stevens@contoso.onmicrosoft.com\"\n    }\n  ]\n}\n<\/pre>\n<h2 id=\"time-zones\">Time zones<\/h2>\n<p>The previously announced Time Zones API from the Outlook endpoint is now available on the Microsoft Graph. Apps can <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/api-reference\/beta\/api\/outlookuser_supportedtimezones\">request a list of all supported time zones from the server<\/a>, in either Windows or IANA format.<\/p>\n<p><strong>Request<\/strong><\/p>\n<pre>GET https:\/\/graph.microsoft.com\/beta\/me\/outlook\/supportedTimeZones\n<\/pre>\n<p><strong>Response<\/strong><\/p>\n<pre>{\n  \"value\": [\n    {\n      \"alias\": \"Dateline Standard Time\",\n      \"displayName\": \"(UTC-12:00) International Date Line West\"\n    },\n    {\n      \"alias\": \"Samoa Standard Time\",\n      \"displayName\": \"(UTC+13:00) Samoa\"\n    },\n    {\n      \"alias\": \"UTC-11\",\n      \"displayName\": \"(UTC-11:00) Coordinated Universal Time-11\"\n    },\n    {\n      \"alias\": \"Aleutian Standard Time\",\n      \"displayName\": \"(UTC-10:00) Aleutian Islands\"\n    },\n    ...\n  ]\n}\n<\/pre>\n<h2 id=\"languages\">Languages<\/h2>\n<p>The previously announced Languages API from the Outlook endpoint is now available on the Microsoft Graph. With this API, apps can <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/api-reference\/beta\/api\/outlookuser_supportedlanguages\">request a list of supported languages<\/a> from the server.<\/p>\n<p><strong>Request<\/strong><\/p>\n<pre>GET https:\/\/graph.microsoft.com\/beta\/me\/outlook\/supportedLanguages\n<\/pre>\n<p><strong>Response<\/strong><\/p>\n<pre>{\n  \"value\": [\n    {\n      \"locale\": \"af-ZA\",\n      \"displayName\": \"Afrikaans (Suid-Afrika)\"\n    },\n    {\n      \"locale\": \"am-ET\",\n      \"displayName\": \"\u12a0\u121b\u122d\u129b (\u12a2\u1275\u12ee\u1335\u12eb)\"\n    },\n    {\n      \"locale\": \"ar-AE\",\n      \"displayName\": \"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062a \u0627\u0644\u0639\u0631\u0628\u064a\u0629 \u0627\u0644\u0645\u062a\u062d\u062f\u0629)\"\n    },\n    {\n      \"locale\": \"ar-BH\",\n      \"displayName\": \"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0628\u062d\u0631\u064a\u0646)\"\n    },\n    ...\n  ]\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In June, we announced new APIs in the beta endpoint of the Outlook REST API. Today we&#8217;re excited to announce that those APIs have been added to the Microsoft Graph, along with some other highly-requested APIs. All of these new APIs are added to the beta version of the Microsoft Graph API.<\/p>\n","protected":false},"author":69108,"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-1581","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-graph","tag-outlook"],"acf":[],"blog_post_summary":"<p>In June, we announced new APIs in the beta endpoint of the Outlook REST API. Today we&#8217;re excited to announce that those APIs have been added to the Microsoft Graph, along with some other highly-requested APIs. All of these new APIs are added to the beta version of the Microsoft Graph API.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/1581","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\/69108"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=1581"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/1581\/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=1581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=1581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=1581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}