Reputation: 49724
I am trying to read my email Sent folder.
GET https://graph.microsoft.com/v1.0/me/mailfolders('outbox')/messages
in Graph Explorer, I always get a empty array:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('16f5a7b6-5a15-4568-aa5a-31bb117e9967')/mailFolders('outbox')/messages",
"value": []
}
And when I run
GET https://graph.microsoft.com/v1.0/me/mailfolders
Only Sent folder (Outbox) shows 0 email, but actually there are emails in the folder.
How can I read Sent folder correctly? Thanks
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('576552d5-3bc0-42a6-a53d-bfceb405db23')/mailFolders",
"@odata.nextLink": "https://graph.microsoft.com/v1.0/me/mailfolders?$skip=10",
"value": [
{
"id": "AAMkADBlZTUwNTkxLWVmODgtNDVhNC1iZjhlLTdjNjA1ODZlMDI5MgAuAAAAAACUbnk-iwQZRbXMgkfKtmYhAQCpTc-InBsuTYwTUBb_VIb4AAAHurthAAA=",
"displayName": "Archive",
"parentFolderId": "AAMkADBlZTUwNTkxLWVmODgtNDVhNC1iZjhlLTdjNjA1ODZlMDI5MgAuAAAAAACUbnk-iwQZRbXMgkfKtmYhAQCpTc-InBsuTYwTUBb_VIb4AAAAAAEIAAA=",
"childFolderCount": 0,
"unreadItemCount": 0,
"totalItemCount": 3510
},
{
"id": "AAMkADBlZTUwNTkxLWVmODgtNDVhNC1iZjhlLTdjNjA1ODZlMDI5MgAuAAAAAACUbnk-iwQZRbXMgkfKtmYhAQCpTc-InBsuTYwTUBb_VIb4AAAAAAEMAAA=",
"displayName": "Inbox",
"parentFolderId": "AAMkADBlZTUwNTkxLWVmODgtNDVhNC1iZjhlLTdjNjA1ODZlMDI5MgAuAAAAAACUbnk-iwQZRbXMgkfKtmYhAQCpTc-InBsuTYwTUBb_VIb4AAAAAAEIAAA=",
"childFolderCount": 5,
"unreadItemCount": 1,
"totalItemCount": 44
},
{
"id": "AAMkADBlZTUwNTkxLWVmODgtNDVhNC1iZjhlLTdjNjA1ODZlMDI5MgAuAAAAAACUbnk-iwQZRbXMgkfKtmYhAQCpTc-InBsuTYwTUBb_VIb4AAAAAAELAAA=",
"displayName": "Outbox",
"parentFolderId": "AAMkADBlZTUwNTkxLWVmODgtNDVhNC1iZjhlLTdjNjA1ODZlMDI5MgAuAAAAAACUbnk-iwQZRbXMgkfKtmYhAQCpTc-InBsuTYwTUBb_VIb4AAAAAAEIAAA=",
"childFolderCount": 0,
"unreadItemCount": 0,
"totalItemCount": 0
}
]
}
Upvotes: 0
Views: 2095
Reputation: 17692
Outbox is not Sent Items. I would expect Outbox to have 0 messages in it almost always, since Outbox only holds messages as they are being sent, so messages only reside there for a very short time.
To get Sent Items, use https://graph.microsoft.com/v1.0/me/mailFolders/SentItems
.
Upvotes: 5