Questions tagged [outlook-restapi]

The Outlook REST APIs include the Mail, Calendar, and Contacts APIs in Office 365.

Welcome to the outlook-restapi tag! Please use this tag to find answers, ask questions, and answer questions about using the Outlook REST APIs.

The Outlook REST APIs are comprised of three distinct APIs that provide access to users' data in Office 365:

  • Mail API: Used to manipulate mail and mail folders.
  • Calendar API: Used to manipulate events and calendars.
  • Contacts API: Used to manipulate contacts and contact folders.

Getting Started

Want to explore and play with the APIs? Check out the Office 365 OAuth Sandbox. You can quickly issue queries against your own data, or against a sandboxed environment.

The Outlook Dev Center has getting started guides in a number of different languages. Start from scratch and end with a working app that retrieves messages from the inbox.

Looking for code samples? Check out the Office Dev Center's Code Samples page. PHP, Node.js, Rails, and more!

Looking for more information, or just want to keep abreast of updates to the APIs? Follow the Outlook REST APIs team's blog.

966 questions
4
votes
1 answer

ResourceNotFound - Using Microsoft Graph API to Reach On-Prem mailboxes in Hybrid Exchange Setup

According to these videos, it looks like it is possible to reach on-prem Exchange mailboxes in a hybrid setup just like Exchange online mailboxes using the Microsoft Graph API. So, we have a hybrid setup in which some of the mailboxes are only…
4
votes
3 answers

Send reference attachment to email via Graph API

Graph API has a 4MB request limit so if I want to send an email with say a 10MB attachment I can't use the FileAttachment type. As I understand it the recommended way to do this is with a ReferenceAttachment which carries a link to a file that has…
Dave Moten
  • 11,957
  • 2
  • 40
  • 47
4
votes
2 answers

How to read my messages from Inbox or sent items from a specific email address and within a particular interval?

i am working in graph explorer API to read the email of my account. the idea is to pass an email address and a date interval to Graph API and it should return me the same Messages Associated with this email.it could be from sent item and inbox can…
ashish jayara
  • 95
  • 1
  • 10
4
votes
2 answers

How to know which mailFolder is the Inbox?

Calling /users/me/mailFolders returns the folders list with their id, displayName, parentFolderId, and some counters. How can I determine which folder is the "Inbox"? I cannot use displayName because this will probably be in the user's native…
Kirill
  • 159
  • 2
  • 11
4
votes
0 answers

Bug: findMeetingTimes throws "OrganizerUnavailable" on 15 minute start times

When using the Graph API findMeetingTimes method on 15 minute start times (for example 3:15, or 3:45), the method will incorrectly throw a "emptySuggestionsReason = OrganizerUnavailable" error (and no rooms returned), whether rooms are available for…
Martin Sommer
  • 536
  • 5
  • 14
4
votes
1 answer

findRooms API limit of 100 rooms

The /findRooms API states: "You can get up to the first 100 rooms in the tenant". Is there a way to increase this limit? I tried /findRooms?$top=1000&$count=true but I am not able to make these query parameters work with findRooms. As stated in…
Martin Sommer
  • 536
  • 5
  • 14
4
votes
1 answer

Failed to load https://login.microsoftonline.com/common/oauth2/v2.0/token

I'm trying to get a token using the Outlook REST API after I got the code from this url https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize I used a POST request with axios but the issue is I got this error: Response to preflight…
paolacl
  • 191
  • 2
  • 6
4
votes
1 answer

Filtering against canEdit in Calendars returns inverted results

I'm using the list calendars endpoint described here. When applying a $filter against the canEdit property, the results are the exact opposite of the filter criteria. When I call: https://graph.microsoft.com/v1.0/me/calendars?$filter=canEdit eq…
nadapeter
  • 41
  • 3
4
votes
1 answer

Office365 REST API - Creating a calendar event with attachments

I am unable to create a calendar event with attachments using Office365's Rest API. Creating events without attachments is not a problem. Trying to create events with attachments creates the event, but the files I send are not added. The server…
4
votes
1 answer

Outlook 365 API - Disable automatic email send when creating Calendar event

I'm working on a project to migrate Gmail calendar events into Outlook 365, the process is to export the Gmail calendar events using Google Calendar API v3, then convert it to compatible outlook event JSON, then post to Outlook API, using: POST…
4
votes
0 answers

Office 365 Mail Rest API retrieving attached *.eml file

I have some email archive with different email address what should keep emails with attachments like: *.pdf, *.png, *.eml and other. I am using embedded in MS Outlook Add-on to get authKeys, then send them on PHP backend, where creating CURL…
Ilia Rebane
  • 1,251
  • 1
  • 9
  • 10
4
votes
2 answers

Get custom property set in Outlook Add-In via Microsoft Graph

Let's say I have in my Outlook Add-In (using Office.js) following code running on a compose form of an appointment: const item = Office.context.mailbox.item; item.loadCustomPropertiesAsync((result) => { const props = result.value; const…
4
votes
1 answer

Errors accessing Shared/Room Calendars through Microsoft Graph API

I'm making an application that requires access to the shared/room-resource calendars in an Office 365 instance, using non-admin accounts. I've registered an app (in the Microsoft Application Registration Portal) using the V2 endpoint and Auth Code…
4
votes
1 answer

Choosing between the UpnName and SmtpAddress for the X-AnchorMailbox header when using Office 365 REST API

We use the Outlook REST API with Azure AD authentication to access mailboxes of our users. The documentation recommends the use of the x-AnchorMailbox header to optimize performance : For optimal performance when using the new Outlook REST…
Gabriel Boya
  • 761
  • 8
  • 17
4
votes
1 answer

How should start and end timezone be handled in OData parameters in O365 Calendar REST API v2.0?

What I'm trying to achieve I want to get all events in a user's calendar, sometimes within a specific window between two instants in time, sometimes just all. These events have to be ordered on event start as an instant in time. The problem I'm…
P44T
  • 1,109
  • 12
  • 21