How to open Outlook Web with a pre-filled search query (Gmail-style email filtering link)?

1 week ago 15
ARTICLE AD BOX

I’m implementing a password-reset and email-verification flow. After we send an email to the user, we want to provide quick-access links such as:

“Search this email in Gmail”

“Search this email in Outlook (Web)”

Here is the code we currently use:

public openGmailSearch(): void { const gmailQuery = encodeURIComponent(`from:${this.domain} subject:"${this.subject}"`); window.open(`https://mail.google.com/mail/u/0/#search/${gmailQuery}`, "_blank"); } public openOutlookSearch(): void { const outlookQuery = encodeURIComponent(`from:${this.domain} AND subject:"${this.subject}"`); window.open(`https://outlook.live.com/mail/0/search?keyword=${outlookQuery}`, "_blank"); }

For Gmail, this works perfectly. I can open Gmail with a pre-filled search filter, for example:

https://mail.google.com/mail/u/0/#search/from:[email protected] subject:"Password Reset"

Gmail accepts the #search/<query> format and automatically applies the search filter.

Problem: How to do the same for Outlook Web?

I’m trying to achieve the same behavior in Outlook Web (outlook.live.com / outlook.office.com). These are the URL formats I have tried:

https://outlook.live.com/mail/0/search?keyword=... https://outlook.live.com/mail/search?q=... https://outlook.live.com/mail/0/#/search?query=... https://outlook.office.com/mail/search?q=...

All of these simply open Outlook Web, but none of them apply the search filter, and nothing appears in the search bar.

Question

Is there a URL format (official or undocumented) that allows opening Outlook Web with a pre-filled search query (similar to Gmail’s #search/... behavior)?

Or is this feature simply not supported by Outlook Web?

If it’s not possible at all, is there any official documentation or reference confirming that Outlook Web does not support URL-based search injection?

Read Entire Article