1

Using the following endpoint returns all mail (both sent and received) for a work account:

GET /me/messages

However it doesn't return all received mail for personal/family accounts. Both the v1.0 and beta versions display this behaviour.

Is there a way of retrieving all received mail for personal/family accounts?

Monty123
  • 103
  • 1
  • 7

1 Answers1

0

returns some or returns error? did you give the api access permissions to those accounts?

make sure to check this official document.

The documentation says you can get up to only 1000 emails at once. And from permissions section, it seems only possible to get all emails from within an application given the permission Mail.ReadBasic.All even for work account.

I don't have a work account thus I tested sending an email to myself on my personal account and tested the query on graph-explorer test page here. The first 2 results are those freshly received and freshly sent ones. with this I will say a work and personal/family accounts are no different on getting emails since you said you can get both received and sent mails from a work account.

so in short, you can get up to 1000 emails unless you use an application with permission to read all but with limited properties because Mail.ReadBasic allows the app to read email in the signed-in user's mailbox except body, previewBody, attachments and any extended properties, and hence I deduce Mail.ReadBasic.All does the same

Yılmaz Durmaz
  • 2,374
  • 12
  • 26
  • Some emails are returned, others are not. I can't see a pattern in which are returned. Emails sent to myself are visible because all sent emails are visible (only some received emails are missing). It's not an issue with exceeding the 1000 message limit, nor a permissions issue. – Monty123 Jan 02 '22 at 19:35
  • @Monty123, is there any filtering set on those accounts? I haven't tried for messages filtered to another folder upon receiving. check if you see any pattern in that. – Yılmaz Durmaz Jan 03 '22 at 07:15