Skip to content

Instantly share code, notes, and snippets.

@Siarl
Last active March 5, 2025 11:27
Show Gist options
  • Save Siarl/c3b77938f45b01a33cbb6df1e146a0e7 to your computer and use it in GitHub Desktop.
Save Siarl/c3b77938f45b01a33cbb6df1e146a0e7 to your computer and use it in GitHub Desktop.
ms-outlook:// URI scheme documentation (Outlook for Android 4.2212.2)
<?xml version="1.0" encoding="utf-8"?>
<actions xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt">
<action intentName="actions.intent.CREATE_MESSAGE">
<fulfillment urlTemplate="ms-outlook://emails/new{?to,name,body,type}">
<parameter-mapping intentParameter="message.text" required="true" urlParameter="body"/>
<parameter-mapping intentParameter="message.@type" urlParameter="type"/>
<parameter-mapping intentParameter="message.recipient.name" urlParameter="name"/>
<parameter-mapping intentParameter="message.recipient.email" urlParameter="to"/>
</fulfillment>
<fulfillment urlTemplate="ms-outlook://emails/new"/>
</action>
<action intentName="actions.intent.OPEN_APP_FEATURE">
<fulfillment urlTemplate="{@url}"/>
<fulfillment urlTemplate="ms-outlook://emails"/>
<parameter name="feature">
<entity-set-reference entitySetId="openAppFeatureParamSet"/>
</parameter>
</action>
<entity-set entitySetId="openAppFeatureParamSet">
<entity alternateName="@array/agendaCalendarView" name="agendaView" url="ms-outlook://events/view?action=agenda"/>
<entity alternateName="@array/dayCalendarView" name="dayView" url="ms-outlook://events/view?action=day"/>
<entity alternateName="@array/monthCalendarView" name="monthView" url="ms-outlook://events/view?action=month"/>
<entity alternateName="@array/focusedInboxSynonyms" name="focusedInbox" url="ms-outlook://emails/inbox/focused"/>
<entity alternateName="@array/otherInboxSynonyms" name="otherInbox" url="ms-outlook://emails/inbox/other"/>
</entity-set>
<action intentName="actions.intent.CREATE_THING">
<fulfillment urlTemplate="ms-outlook://events/new{?title,description}">
<parameter-mapping intentParameter="thing.name" required="true" urlParameter="title"/>
<parameter-mapping intentParameter="thing.description" urlParameter="description"/>
</fulfillment>
<fulfillment urlTemplate="ms-outlook://events/new"/>
</action>
<action intentName="actions.intent.GET_THING">
<fulfillment urlTemplate="ms-outlook://search{?querytext}">
<parameter-mapping intentParameter="thing.name" required="true" urlParameter="querytext"/>
</fulfillment>
<fulfillment urlTemplate="ms-outlook://search/"/>
</action>
<action intentName="custom.actions.intent.EVENT_VIEW" queryPatterns="@array/eventNextQueries">
<fulfillment urlTemplate="ms-outlook://events/view?action=next"/>
</action>
<action intentName="custom.actions.intent.CALENDAR_VIEW" queryPatterns="@array/calendarViewQueries">
<fulfillment urlTemplate="ms-outlook://events/view?action=day"/>
</action>
<action intentName="custom.actions.intent.PLAY_EMAILS" queryPatterns="@array/PlayEmailQueries">
<parameter name="verb" type="https://schema.org/Text"/>
<fulfillment urlTemplate="ms-outlook://pme{?action}">
<parameter-mapping intentParameter="verb" required="true" urlParameter="action"/>
</fulfillment>
<fulfillment urlTemplate="ms-outlook://pme"/>
</action>
</actions>

Using the ms-outlook schema you are able to launch Outlook programmatically. Since I couldn't find any clear documentation on how to use this schema I decompiled the apk of version 4.2212.2.

Here is a simple form of documentation:

actions.xml shows that the app accepts the following urls (prepended with ms-outlook://):

  • *empty string*
  • emails
  • emails/inbox These options open the email page on the tab last used.
  • emails/inbox/focused
  • emails/inbox/other These options open the email page on the corresponding tab (focused or other).
  • emails/new{?to,name,body,type} This opens the page for writing a new calendar event. Params to, name and body are optional and explain themselves.
  • events/new{?title,description} This opens the page for writing a new calendar event. Params title and description are optional and explain themselves.
  • events/view{?action=[next,agenda,day,month]} This opens the calendar page. action param is optional and can be next/agenda, day, month which will set the how the overview is displayed. (I couldn't find the action corresponding to the 3-day view easily, but I assume there is one)
  • search{?querytext} This opens the search page. queryText param is optional
  • pme{?action} I assume this is for Outlooks "Play My Email" function but I couldn't get this one to work.

Note: If the app is displaying an email while one of these first five urls is used, it does not navigate to that page. This does not happen while displaying a calendar event. Seems like this might be unintentional.

@keithlyding
Copy link

You rock! Been trying to do this for over a week and can find nothing until now. Thank you!

Just curious...I have a minor minor issue. If I can't eliminate, no worries. I am using the "next" view on the calendars (all views do same thing), and when I open the link, the calendar shows up just how I like it, but it also shows the menu, where all the calendars are listed with their colors and names. In the app, I can hide this by clicking the 3 menu lines at the top right. I'd like it to start hidden though. Do you know a way of doing this?

@Siarl
Copy link
Author

Siarl commented Nov 1, 2024

@keithlyding I wrote this down since I was looking into an issue at a previous job and couldn't find any documentation. I haven't been involved in this for a while so I can't help you. You can try to find any new options yourself by unpacking the latest outlook apk and looking for this file. Maybe they have updated some stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment