Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In June, we announced new APIs in the beta endpoint of the Outlook REST API. Today we'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.
Try these new APIs out today, either in your code or in the Graph Explorer. Leave feedback on the new APIs on UserVoice.
The Microsoft Graph API has added mailbox rule support via the Rules API. By using this API, apps can now list a user's rules and create new rules.
Request
[js]
GET https://graph.microsoft.com/beta/me/mailFolders/inbox/messagerules
[/js]
Response
[js]
{
"value": [
{
"id": "AQAAAPUfKuc=",
"displayName": "Chris Gray",
"sequence": 1,
"isEnabled": true,
"hasError": false,
"isReadOnly": false,
"conditions": {
"fromAddresses": [
{
"emailAddress": {
"name": "Chris Gray",
"address": "chrisg@contoso.onmicrosoft.com"
}
}
]
},
"actions": {
"moveToFolder": "AAMkAGZj....",
"stopProcessingRules": true
}
}
]
}
[/js]
Request
[js]
POST https://graph.microsoft.com/beta/me/mailFolders/inbox/messagerules
{
"displayName": "From partner",
"sequence": 2,
"isEnabled": true,
"conditions": {
"senderContains": [
"adele"
]
},
"actions": {
"forwardTo": [
{
"emailAddress": {
"name": "Alex Wilbur",
"address": "AlexW@contoso.onmicrosoft.com"
}
}
],
"stopProcessingRules": true
}
}
[/js]
Response
[js]
{
"id": "AQAAAPUfKuk=",
"displayName": "From partner",
"sequence": 2,
"isEnabled": true,
"hasError": false,
"isReadOnly": false,
"conditions": {
"senderContains": [
"ADELE"
]
},
"actions": {
"stopProcessingRules": true,
"forwardTo": [
{
"emailAddress": {
"name": "Alex Wilbur",
"address": "AlexW@contoso.onmicrosoft.com"
}
}
]
}
}
[/js]
The Microsoft Graph API has added access to the master categories list in a user's mailbox via the Categories API. By using this API, apps can now get the user's master category list and add new categories.
Request
[js]
GET https://graph.microsoft.com/beta/me/outlook/masterCategories
[/js]
Response
[js]
{
"value": [
{
"id": "24ed9127-fe16-412d-9870-5efea8a2e8fc",
"displayName": "Red category",
"color": "preset0"
},
{
"id": "7fd099e2-7526-4edf-98e8-35ce90277496",
"displayName": "Orange category",
"color": "preset1"
},
...
]
}
[/js]
Request
[js]
POST https://graph.microsoft.com/beta/me/outlook/masterCategories
{
"displayName": "Project expenses",
"color": "preset9"
}
[/js]
Response
[js]
{
"id": "2393a824-ec66-46fb-88c3-5b455474d57c",
"displayName": "Project expenses",
"color": "preset9"
}
[/js]
The Microsoft Graph API has added the RFC5322 message headers to the message resource. The headers are available in the internetMessageHeaders
property, which is a collection of internetMessageHeader resources. The internetMessageHeaders
property is not in the default property set for messages, so you must request it explicitly using the $select
query parameter.
Request
[js]
GET https://graph.microsoft.com/beta/me/messages/{message-id}?$select=subject,internetMessageHeaders
[/js]
Response
[js]
{
"id": "AAMkAGZj...",
"subject": "Vacation request",
"internetMessageHeaders": [
{
"name": "MIME-Version",
"value": "1.0"
},
{
"name": "Date",
"value": "Wed, 4 Oct 2017 10:32:27 -0400"
},
...
]
}
[/js]
The previously announced Rooms API from the Outlook endpoint is now available on the Microsoft Graph. We've added the ability to find both rooms and room lists.
Request
[js]
GET https://graph.microsoft.com/beta/me/findroomlists
[/js]
Response
[js]
{
"value": [
{
"name": "Building 1 Rooms",
"address": "Building1Rooms@contoso.onmicrosoft.com"
},
{
"name": "Building 2 Rooms",
"address": "Building2Rooms@contoso.onmicrosoft.com"
}
]
}
[/js]
Request (all rooms)
[js]
GET https://graph.microsoft.com/beta/me/findrooms
[/js]
Request (rooms in a room list)
[js]
GET https://graph.microsoft.com/beta/me/findrooms(roomlist='Building1Rooms\@contoso.onmicrosoft.com')
[/js]
Response
[js]
{
"value": [
{
"name": "Conf Room Adams",
"address": "Adams@contoso.onmicrosoft.com"
},
{
"name": "Conf Room Crystal",
"address": "Crystal@contoso.onmicrosoft.com"
},
{
"name": "Conf Room Stevens",
"address": "Stevens@contoso.onmicrosoft.com"
}
]
}
[/js]
The previously announced Time Zones API from the Outlook endpoint is now available on the Microsoft Graph. Apps can request a list of all supported time zones from the server, in either Windows or IANA format.
Request
[js]
GET https://graph.microsoft.com/beta/me/outlook/supportedTimeZones
[/js]
Response
[js]
{
"value": [
{
"alias": "Dateline Standard Time",
"displayName": "(UTC-12:00) International Date Line West"
},
{
"alias": "Samoa Standard Time",
"displayName": "(UTC+13:00) Samoa"
},
{
"alias": "UTC-11",
"displayName": "(UTC-11:00) Coordinated Universal Time-11"
},
{
"alias": "Aleutian Standard Time",
"displayName": "(UTC-10:00) Aleutian Islands"
},
...
]
}
[/js]
The previously announced Languages API from the Outlook endpoint is now available on the Microsoft Graph. With this API, apps can request a list of supported languages from the server.
Request
[js]
GET https://graph.microsoft.com/beta/me/outlook/supportedLanguages
[/js]
Response
[js]{
"value": [
{
"locale": "af-ZA",
"displayName": "Afrikaans (Suid-Afrika)"
},
{
"locale": "am-ET",
"displayName": "አማርኛ (ኢትዮጵያ)"
},
{
"locale": "ar-AE",
"displayName": "العربية (الإمارات العربية المتحدة)"
},
{
"locale": "ar-BH",
"displayName": "العربية (البحرين)"
},
...
]
}
[/js]