Created
March 3, 2017 15:09
-
-
Save amlwwalker/2cf8e90d1988937313cfa9bc4cb21da4 to your computer and use it in GitHub Desktop.
Outlook Headers retrieval start...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var queryParams = { | |
'$select': 'Subject,ReceivedDateTime,From,SingleValueExtendedProperties', | |
'$orderby': 'ReceivedDateTime desc', | |
'$top': 10, | |
'$expand': 'SingleValueExtendedProperties($filter=PropertyId eq \'String 0x7D\')' | |
}; | |
var token = req.session.access_token; | |
var email = req.session.email; | |
// Set the API endpoint to use the v2.0 endpoint | |
outlook.base.setApiEndpoint('https://outlook.office.com/api/v2.0'); | |
// Set the anchor mailbox to the user's SMTP address | |
outlook.base.setAnchorMailbox(email); | |
outlook.mail.getMessages({token: token, odataParams: queryParams}, | |
function(error, result){ | |
result.value.forEach(function(message) { | |
console.log('Properties: ' + message.SingleValueExtendedProperties); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment