0
votes

I am developing an app to retrieve mail/calendar information. I am using the App model v2.0 OAuth2 and the Outlook REST API. I have a personal Live ([email protected]) account which can use the outlook.com web interface to view mail/calendar data.

When I use the same account with Outlook REST API I get the following error (also in OAuth Outlook Sandbox) while doing this request: https://outlook.office.com/api/v2.0/me/mailfolders/inbox/messages?$top=10

"error": {
    "code": "ErrorMissingEmailAddress",
    "message": "When making a request as an account that does not have a mailbox, you must specify the mailbox primary SMTP address for any distinguished folder Ids."
}

What is the cause of this error and how can it be solved ?

1
Does it work with an office365 account?Benoit Patra
I have a different Office 365 account and it works fine.JeroenB
For clarity regarding working fine, is it like, the office 365 account is used to get the client id & client secret. Then signing in using your personal outlook account, you are getting the desired result ? Because I am getting the same error message even then.anoop

1 Answers

2
votes

You are receiving this error because your account hasn't yet been upgraded yet to Office 365 infrastructure and this is required for the REST APIs to work. You can confirm this by logging into outlook.com and see "Outlook.com" in the top left corner. If you have been upgraded, you will see "Outlook Mail (Preview)" instead. We are in the process of deploying a fix to v2.0 endpoint return a more informative error for this case - MailboxNotEnabledForRESTAPI.

We are actively upgrading all accounts to Office 365, so no action needed from your side. In the meantime, to request an Outlook.com developer preview account with the REST APIs enabled, send us an email at [email protected].