0
votes

I'm trying to search the outlook v2 API for a message containing a URL.

The html body of the message contains a URL:

<a href=\"http://www.google.com/\">http://www.google.com</a>

https://outlook.office.com/api/v2.0/me/mailfolders/inbox/messages?$search=%22http://www.google.com%22

  • Returns no results

%22http%3a%2f%2fwww.google.com%22

  • Returns no results

%22http%3a%2f%2fwww*google*com%22

  • Returns the mail
  • Also returns the message containing <a href=\"http://www.google.co.uk/\">http://www.google.co.uk</a>, good company.

Is there any way to query without wildcards that will return only messages with the exact URL match?

Thanks!

2

2 Answers

0
votes

According to the Outlook documentation, the Body of a messages is not filterable, so you won't be able to search it for content. https://msdn.microsoft.com/en-us/office/office365/api/complex-types-for-mail-contacts-calendar#message.

0
votes