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
2 answers

Office 365 API is returning incorrect start and end datetimes for all day events

Here's the steps to reproduce the bug: Check your timezone settings in Office 365, mine is set to Eastern US, so it's a 5 hour offset right now: http://take.ms/2qwxJ Create an all-day event: http://take.ms/tRWSf Confirm that the event starts and…
Brett C
  • 291
  • 2
  • 13
4
votes
2 answers

Calendar or user timezone with Office 365 API

Is it possible to get timezone of a user or its calendar through Office 365 or Graph API? I know that you can get start and end timezone from specific event. But that does not help me.
user2011328
  • 307
  • 3
  • 10
3
votes
0 answers

Office365 graph task push notifications issue

We are using this graph API to create a subscription. For the task delete event we are not receiving any notification from Microsoft. We are receiving notifications for creating and updating the same task. Please advise on this.
3
votes
2 answers

How to get and set custom sorting order on MS To-Do using GraphAPI

Requirement Explanation I'm developing a company dashboard, wish MS To-Do is part of as a widget, and there is no value if I can't sync task sorting order between tools such as MS To-Do, Outlook, or To-Do mobile applications. Outlook Tasks REST…
3
votes
1 answer

Office-JS - Outlook addin not setting x-headers in outlook 2019

Based on Set custom header (x-header) on Outlook compose mail with JS addin post, I used the following code to set a custom x-header when composing emails in OWA or Outlook 2019. function addCustomHeadersAsync(classificationMarking) { return new…
kjack51
  • 31
  • 5
3
votes
1 answer

Outlook contacts change their ID when you move them to another folder

I have a problem with the Microsoft Graph Rest API. I have written a progam that should read the contacts from Outlook and later match them again and again. For this I use the ID from the contacts record. My program reads over all folders and gets…
3
votes
2 answers

Calendar Id randomly changed

Whats the reason that make a calendar change it's id when using microsoft graph ??? This happened today for one of our clients who's been using his main Calendar for over 2 years, and suddenly today, the id is changed and we are unable to add any…
3
votes
2 answers

Outlook 365 OAuth 535 5.7.3 Authentication unsuccessful

I'm trying to send an email via smtp.live.com using an OAuth token generated via https://login.microsoftonline.com/common/oauth2/v2.0/… but I'm receiving the following error: 535 5.7.3 Authentication unsuccessful I can make it work by obtaining an…
Cam Price-Austin
  • 1,738
  • 2
  • 18
  • 31
3
votes
0 answers

Office 365 events list request returns only two events

For some of our users that connected office 365 calendar via oauth 2.0 we get only one or two event from calendar. But user clearly have more and we requested for more. Request url looks like this…
user1876339
  • 319
  • 1
  • 2
  • 7
3
votes
1 answer

How to pass date as Query to get_events() in Microsoft O365 calendar in Python

I want to get events of my calendar in a particular date using python O365 library. #code to create account instance schedule = account.schedule() for item in schedule.get_events(query= "start/dateTime ge '2019-11-23T08:00' and end/dateTime ge…
3
votes
1 answer

How to refresh the Outlook compose window after uploading an attachment through the rest API?

I have an Outlook web addin which can be used in the compose window. What the addin does is, send a request to our server with the ID of the selected file to attach (Our server is a file storage system. The user will be able to select a file and…
3
votes
0 answers

Unable to read attachments from email using Outlook Graph API v2 in C#

I am trying to read an email attachment using Microsoft Graph API(v2) but I am getting "Object reference not set to an instance" error I have verified the app permissions in Azure Active Directory and has all the permissions set mentioned in…
Dipti K
  • 31
  • 2
3
votes
0 answers

Can we set "Do Not Forward" permission to an email sent programmatically?

I want to set "Do Not Forward" permission which is available on the Outlook Client, to the mails i sent programmatically. How can it be achieved? I have a C# application which will sent a mail which contains sensitive information so would like to…
3
votes
2 answers

How to get authorization token through OAuth2 and read Outlook emails through http requests?

I've been retrieving my emails in Outlook by only using python requests to GET the endpoint https://outlook.office365.com/api/v1.0/me/messages Example code: import requests requests.get('https://outlook.office365.com/api/v1.0/me/messages',…
3
votes
1 answer

React Microsoft Outlook Calendar data Without Login Session using Hello.js

I am creating a React calendar that take data from "Microsoft Outlook Calendar" using the client-side JavaScript SDK "hello.js" and Microsoft Graph (for the set up I also followed this guide:…