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

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?

March 16th, 2015 6:10am

Saw your post on Stack: http://stackoverflow.com/questions/29060519/office365-get-messages-and-filter-who-from. You can't filter on complex properties currently.
Free Windows Admin Tool Kit Click here and download it now
March 16th, 2015 10:59am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics