Microsoft Outlook Component
Read and manage Microsoft Outlook calendars and email
Component key: ms-outlookDescription
Microsoft Outlook is a productivity suite for managing email and calendar.
Connections
OAuth 2.0 Authorization Code
You will first need to create and configure a new "App Registration" within your Azure Active Directory tenant. When creating the application you will be prompted to select the 'Supported account types'. Under this section, be sure to select 'Accounts in any organizational directory (Any Azure AD directory - Multitenant)'.
You will need to go to "Platforms" and add the "Web" platform. In that section you should add Prismatic's OAuth 2.0 callback URL - https://oauth2.prismatic.io/callback - as a Redirect URI.
Next, go to "Certificates & Secrets" for the app and add a new Client Secret. Note this value as you will need to supply it to the connection within Prismatic.
You will also need the Application (client) ID from the "Overview" page.
Now, configure the OAuth 2.0 connection in Prismatic. Add an Microsoft Outlook OAuth 2.0 connection config variable:
- Use the Application (client) ID value for the Client ID field.
- Use the Client Secret for the same named field.
- If you didn't select Multitenant when creating the Azure application, you will need to replace the Authorize URL and Token URL with ones specific to your tenant.
- The default scopes are as follows. You can remove scopes that you don't need:
https://graph.microsoft.com/User.Read
for reading basic user datahttps://graph.microsoft.com/Calendars.ReadWrite
for managing Outlook calendarhttps://graph.microsoft.com/Mail.ReadWrite
for managing emailhttps://graph.microsoft.com/Mail.Send
for sending email
Save your integration and you should be able to authenticate a user with OAuth 2.0 to access their Microsoft Outlook data.
Triggers
Webhook
Receive and validate webhook requests from Outlook for webhooks you configure. | key: webhook
Actions
Cancel Event
Cancel an Event | key: cancelEvent
Output Example Payload
{
"data": ""
}
Create Calendar
Create a new Calendar | key: createCalendar
Output Example Payload
{
"data": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#me/calendars/$entity",
"@odata.id": "https://graph.microsoft.com/v1.0/users('266efe5a-0fd7-4edd-877b-b2d1e561f193@ae01a323-3934-4475-a32d-af1274312bb0')/calendars('AAMkADJmMVAAA=')",
"id": "AAMkADJmMVAAA=",
"name": "Volunteer",
"color": "auto",
"changeKey": "DxYSthXJXEWwAQSYQnXvIgAAIxGttg==",
"canShare": true,
"canViewPrivateItems": true,
"hexColor": "",
"canEdit": true,
"allowedOnlineMeetingProviders": [
"teamsForBusiness"
],
"defaultOnlineMeetingProvider": "teamsForBusiness",
"isTallyingResponses": true,
"isRemovable": false,
"owner": {
"name": "Samantha Booth",
"address": "samanthab@adatum.onmicrosoft.com"
}
}
}
Create Event
Create an Event on a Calendar | key: createEvent
Output Example Payload
{
"data": {
"subject": "Let's go for lunch",
"body": {
"contentType": "html",
"content": "Does noon work for you?"
},
"start": {
"dateTime": "2017-04-15T12:00:00",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2017-04-15T14:00:00",
"timeZone": "Pacific Standard Time"
},
"location": {
"displayName": "Harry's Bar"
},
"attendees": [
{
"emailAddress": {
"address": "samanthab@contoso.onmicrosoft.com",
"name": "Samantha Booth"
},
"type": "required"
}
],
"allowNewTimeProposals": true,
"transactionId": "7E163156-7762-4BEB-A1C6-729EA81755A7"
}
}
Create Event Subscription
Create an Event subscription for Microsoft Outlook | key: createEventSubscription
Create Mail Folder
Create a new mail folder | key: createMailFolder
Output Example Payload
{
"data": {
"displayName": "displayName-value",
"parentFolderId": "parentFolderId-value",
"childFolderCount": 0,
"unreadItemCount": 0,
"totalItemCount": 0,
"id": "id-value",
"isHidden": true
}
}
Create Mail Folder Subscription
Create a Mail Folder subscription for Microsoft Outlook | key: createMailFolderSubscription
Delete All Instance Subscriptions
Delete all subscriptions pointed at this instance | key: deleteAllInstanceSubscriptions
Output Example Payload
{
"data": {
"subscriptionsRemoved": [
"26ebd1e9-c54a-4bbe-9583-fc05974952a4",
"b9b27172-ee2e-4248-86df-fc98cb71d914"
]
}
}
Delete Calendar
Delete an existing Calendar | key: deleteCalendar
Output Example Payload
{
"data": ""
}
Delete Event
Delete an Event | key: deleteEvent
Output Example Payload
{
"data": ""
}
Delete Mail Folder
Delete the specified mail folder | key: deleteMailFolder
Output Example Payload
{
"data": null
}
Delete Message
Delete message by ID | key: deleteMessage
Output Example Payload
{
"data": null
}
Delete Subscription
Delete existing subscription for Microsoft Outlook | key: deleteSubscription
Output Example Payload
{
"data": ""
}
Get Current User
Get the information and metadata of the user that is currently logged in | key: getCurrentUser
Output Example Payload
{
"data": {
"businessPhones": [
"+1 555 555 5555"
],
"displayName": "exampleUser",
"givenName": "exampleUser",
"jobTitle": "Retail Manager",
"mail": "someoneV@example.onmicrosoft.com",
"mobilePhone": "+1 555 555 5555",
"officeLocation": "example",
"preferredLanguage": "en-US",
"surname": "Example",
"id": "3693-4789-a1c3-f4de565f"
}
}
Get Mail Message
Fetch and parse a raw message by ID | key: getMessageById
Output Example Payload
{
"data": {
"message": {
"headers": {
"mime-version": "1.0",
"date": "2022-09-19T20:09:01.000Z",
"message-id": "<Test-message-id@mail.outlook.com>",
"subject": "Test Message",
"from": {
"value": [
{
"address": "example@outlook.com",
"name": "Example Example"
}
],
"html": "<span class=\"mp_address_group\"><span class=\"mp_address_name\">Example Example</span> <<a href=\"mailto:example@gmail.com\" class=\"mp_address_email\">example@gmail.com</a>></span>",
"text": "Example Example <example@outlook.com>"
},
"to": {
"value": [
{
"address": "example@outlook.com",
"name": "Example Example"
}
],
"html": "<span class=\"mp_address_group\"><span class=\"mp_address_name\">Example Example</span> <<a href=\"mailto:example@gmail.com\" class=\"mp_address_email\">example@gmail.com</a>></span>",
"text": "Example Example <example@outlook.com>"
},
"content-type": {
"value": "multipart/mixed",
"params": {
"boundary": "000000000000680fa005e90d488f"
}
}
},
"attachments": [],
"text": "Example email body",
"html": "<div dir=\"ltr\">Example email body<div><br></div></div>\n"
},
"rawMessage": "Raw MIME message"
}
}
Get Schedule Availability
Get the free/busy availability information for a collection of users | key: getSchedule
Output Example Payload
{
"data": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.scheduleInformation)",
"value": [
{
"scheduleId": "adelev@contoso.onmicrosoft.com",
"availabilityView": "000220000",
"scheduleItems": [
{
"isPrivate": false,
"status": "busy",
"subject": "Let's go for lunch",
"location": "Harry's Bar",
"start": {
"dateTime": "2019-03-15T12:00:00.0000000",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2019-03-15T14:00:00.0000000",
"timeZone": "Pacific Standard Time"
}
}
],
"workingHours": {
"daysOfWeek": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"startTime": "08:00:00.0000000",
"endTime": "17:00:00.0000000",
"timeZone": {
"name": "Pacific Standard Time"
}
}
},
{
"scheduleId": "meganb@contoso.onmicrosoft.com",
"availabilityView": "200220010",
"scheduleItems": [
{
"status": "busy",
"start": {
"dateTime": "2019-03-15T08:30:00.0000000",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2019-03-15T09:30:00.0000000",
"timeZone": "Pacific Standard Time"
}
},
{
"status": "busy",
"start": {
"dateTime": "2019-03-15T12:00:00.0000000",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2019-03-15T14:00:00.0000000",
"timeZone": "Pacific Standard Time"
}
},
{
"status": "tentative",
"start": {
"dateTime": "2019-03-15T12:00:00.0000000",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2019-03-15T13:00:00.0000000",
"timeZone": "Pacific Standard Time"
}
},
{
"status": "busy",
"start": {
"dateTime": "2019-03-15T13:00:00.0000000",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2019-03-15T14:00:00.0000000",
"timeZone": "Pacific Standard Time"
}
},
{
"status": "tentative",
"start": {
"dateTime": "2019-03-15T16:00:00.0000000",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2019-03-15T17:00:00.0000000",
"timeZone": "Pacific Standard Time"
}
}
],
"workingHours": {
"daysOfWeek": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"startTime": "08:00:00.0000000",
"endTime": "17:00:00.0000000"
}
}
]
}
}
List Calendars
List all Calendars for the user | key: listCalendars
Output Example Payload
{
"data": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#me/calendars",
"value": [
{
"@odata.id": "https://graph.microsoft.com/v1.0/users('ddfcd489-628b-40d7-b48b-57002df800e5@1717622f-1d94-4d0c-9d74-709fad664b77')/calendars('AAMkAGI2TGuLAAA=')",
"id": "AAMkAGI2TGuLAAA=",
"name": "Calendar",
"color": "auto",
"changeKey": "nfZyf7VcrEKLNoU37KWlkQAAA0x0+w==",
"canShare": true,
"canViewPrivateItems": true,
"hexColor": "",
"canEdit": true,
"allowedOnlineMeetingProviders": [
"teamsForBusiness"
],
"defaultOnlineMeetingProvider": "teamsForBusiness",
"isTallyingResponses": true,
"isRemovable": false,
"owner": {
"name": "Samantha Booth",
"address": "samanthab@adatum.onmicrosoft.com"
}
}
]
}
}
List Events
List all Events for the user | key: listEvents
Output Example Payload
{
"data": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('cd209b0b-3f83-4c35-82d2-d88a61820480')/events(subject,body,bodyPreview,organizer,attendees,start,end,location)",
"value": [
{
"@odata.etag": "W/\"ZlnW4RIAV06KYYwlrfNZvQAAKGWwbw==\"",
"id": "AAMkAGIAAAoZDOFAAA=",
"subject": "Orientation ",
"bodyPreview": "Dana, this is the time you selected for our orientation. Please bring the notes I sent you.",
"body": {
"contentType": "html",
"content": "<html><head></head><body><p>Dana, this is the time you selected for our orientation. Please bring the notes I sent you.</p></body></html>"
},
"start": {
"dateTime": "2017-04-21T10:00:00.0000000",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2017-04-21T12:00:00.0000000",
"timeZone": "Pacific Standard Time"
},
"location": {
"displayName": "Assembly Hall",
"locationType": "default",
"uniqueId": "Assembly Hall",
"uniqueIdType": "private"
},
"locations": [
{
"displayName": "Assembly Hall",
"locationType": "default",
"uniqueIdType": "unknown"
}
],
"attendees": [
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": "Samantha Booth",
"address": "samanthab@a830edad905084922E17020313.onmicrosoft.com"
}
},
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": "Dana Swope",
"address": "danas@a830edad905084922E17020313.onmicrosoft.com"
}
}
],
"organizer": {
"emailAddress": {
"name": "Samantha Booth",
"address": "samanthab@a830edad905084922E17020313.onmicrosoft.com"
}
}
}
]
}
}
List Mail Folders
Get the mail folder collection directly under the root folder of the signed-in user, or under the specified parent folder. | key: listMailFolders
Output Example Payload
{
"data": {
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users('68ca8ec0-11f8-456b-a785-70d9936650d5')/mailFolders",
"value": [
{
"id": "AQMkADYAAAIBCgAAAA==",
"displayName": "Deleted Items",
"parentFolderId": "AQMkADYAAAIBCAAAAA==",
"childFolderCount": 0,
"unreadItemCount": 0,
"totalItemCount": 0,
"isHidden": false
},
{
"id": "AQMkADYAAAIBDwAAAA==",
"displayName": "Drafts",
"parentFolderId": "AQMkADYAAAIBCAAAAA==",
"childFolderCount": 0,
"unreadItemCount": 0,
"totalItemCount": 0,
"isHidden": false
},
{
"id": "AQMkADYAAAIBDAAAAA==",
"displayName": "Inbox",
"parentFolderId": "AQMkADYAAAIBCAAAAA==",
"childFolderCount": 1,
"unreadItemCount": 70,
"totalItemCount": 71,
"isHidden": false
},
{
"@odata.type": "#microsoft.graph.mailSearchFolder",
"id": "AAMkADYRAAAZg1yTAAA=",
"displayName": "Weekly digests",
"parentFolderId": "AQMkADYAAAIBDAAAAA==",
"childFolderCount": 0,
"unreadItemCount": 4,
"totalItemCount": 5,
"isHidden": false,
"isSupported": true,
"filterQuery": "contains(subject, 'weekly digest')"
},
{
"id": "AQMkADYAAAIBGQAAAA==",
"displayName": "Junk Email",
"parentFolderId": "AQMkADYAAAIBCAAAAA==",
"childFolderCount": 0,
"unreadItemCount": 0,
"totalItemCount": 0,
"isHidden": false
},
{
"id": "AQMkADYAAAIBCwAAAA==",
"displayName": "Outbox",
"parentFolderId": "AQMkADYAAAIBCAAAAA==",
"childFolderCount": 0,
"unreadItemCount": 0,
"totalItemCount": 0,
"isHidden": false
},
{
"id": "AQMkADYAAAIBCQAAAA==",
"displayName": "Sent Items",
"parentFolderId": "AQMkADYAAAIBCAAAAA==",
"childFolderCount": 0,
"unreadItemCount": 0,
"totalItemCount": 0,
"isHidden": false
}
]
}
}
List Mail Messages
List mail messages in a user's mailbox | key: listMessages
Output Example Payload
{
"data": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('bb8775a4-4d8c-42cf-a1d4-4d58c2bb668f')/messages(sender,subject)",
"value": [
{
"@odata.etag": "W/\"CQAAABYAAADHcgC8Hl9tRZ/hc1wEUs1TAAAwR4Hg\"",
"id": "AAMkAGUAAAwTW09AAA=",
"subject": "You have late tasks!",
"sender": {
"emailAddress": {
"name": "Microsoft Planner",
"address": "noreply@Planner.Office365.com"
}
}
}
]
}
}
List Subscriptions
List all subscriptions for Microsoft Outlook | key: listSubscriptions
List Supported Languages
List supported languages for current user | key: listSupportedLanguages
List Supported Timezones
List supported timezones for current user | key: listSupportedTimezones
Raw Request
Send raw HTTP request to Microsoft Outlook | key: rawRequest
Send Message
Send a new message | key: sendMessage
Update Calendar
Update an existing Calendar | key: updateCalendar
Output Example Payload
{
"data": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#me/calendars/$entity",
"@odata.id": "https://graph.microsoft.com/v1.0/users('266efe5a-0fd7-4edd-877b-b2d1e561f193@ae01a323-3934-4475-a32d-af1274312bb0')/calendars('AAMkADJmMVAAA=')",
"id": "AAMkADJmMVAAA=",
"name": "Social events",
"color": "auto",
"isDefaultCalendar": false,
"changeKey": "DxYSthXJXEWwAQSYQnXvIgAAIxGttg==",
"canShare": true,
"canViewPrivateItems": true,
"hexColor": "",
"canEdit": true,
"allowedOnlineMeetingProviders": [
"teamsForBusiness"
],
"defaultOnlineMeetingProvider": "teamsForBusiness",
"isTallyingResponses": true,
"isRemovable": false,
"owner": {
"name": "Samantha Booth",
"address": "samanthab@adatum.onmicrosoft.com"
}
}
}
Update Event
Update an existing Event | key: updateEvent
Output Example Payload
{
"data": {
"subject": "Let's go for lunch",
"body": {
"contentType": "html",
"content": "Does noon work for you?"
},
"start": {
"dateTime": "2017-04-15T12:00:00",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2017-04-15T14:00:00",
"timeZone": "Pacific Standard Time"
},
"location": {
"displayName": "Harry's Bar"
},
"attendees": [
{
"emailAddress": {
"address": "samanthab@contoso.onmicrosoft.com",
"name": "Samantha Booth"
},
"type": "required"
}
],
"allowNewTimeProposals": true,
"transactionId": "7E163156-7762-4BEB-A1C6-729EA81755A7"
}
}
Update Event Subscription Expiration
Update existing Event subscription expiration for Microsoft Outlook | key: updateEventSubscription