Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

office 365 SDK - Get messages by filtering the from email address

$
0
0

Hi all,

My app gets messages from the user exchange account. But when i'm trying to filter it with the from email address it doesn't work.

This is the code i have in the api sandbox:

outlookClient.me.folders.getFolder('Inbox').messages.getMessages()
.filter("from/emailAddress/address eq 'katiej@a830edad9050849NDA1.onmicrosoft.com'")
.orderBy('DateTimeReceived desc').fetchAll(10).then(
function (result) {
   result.forEach(function (message) {
       console.log('Message "' + message.from.emailAddress.address + '" received at "' + message.dateTimeReceived.toString() + '"');
   });
}, function(error) {
   console.log(error);
}
);

I get the following error:

"{\"error\":{\"code\":\"ErrorInvalidProperty\",\"message\":\"The property 'Address' is invalid.\"}}"

Can anyone help me with that?


Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>