1

I am trying to make something which involves syncing of emails across users in office 365. I am using Outlook's REST API but I cannot find any function similar to IMAP's Append in this API. (Please note I don't want to send. I want something similar to insert or push)

Also, from the response to this question, I found that Office 365 does not support OAuth Mechanism for IMAP. So I cannot use Outlook OAuth2.0 to connect to IMAP.

Is there any way to connect to office365 account with IMAP without a password or to push email using Outlook REST API?

  • The comments on that question cast some doubt on whether it does or not. The current CAPABILITY string indicates support for XOAUTH2, which is currently documented here: https://developers.google.com/gmail/xoauth2_protocol – Max Oct 21 '16 at 16:06
  • The link you provided gives a way to access gmail accounts using OAuth token and IMAP. However, the same mechanism fails if we switch to outlook. IMAP is supported but not through OAuth mechanism for Office365. – Krishna Khowal Oct 22 '16 at 01:54
  • Well, they're either working on it or left it half implemented because the server says it supports XOAUTH2 authentication in its IMAP CAPABILITY string. Maybe you need a special scope. – Max Oct 22 '16 at 16:10
  • Yes, for IMAP wl.imap and wl.offline_access scope are required, but when included while requesting the access token, we receive a bad request error. IMAP works fine if connected using username password though. – Krishna Khowal Oct 22 '16 at 19:04

1 Answers1

0

Apparently, I figured it out later that there is no way to authorize outlook 365 accounts without username and password. Hence, to use IMAP.Append, one has to provide username and password.