How to compose a New Message or Event and Populate fields in Office365


Hi there,

I have seen many examples at customers where they have used Outlook Web Access (OWA) to integrate (un)structured processes through zero-development effort, such as:

  • Open a new message from the user to send a question from the Employee Intranet
  • Populate mail with workflow information and use builtin user capabilities to add attachment files or policies
  • Automate Meetings or events in the user calendar

Recently one of our customers, moving to the cloud, ask for this functionality in Office365. As I didn't find any reference about it, I'm sharing for your benefit.

Special thanks to @EduardoMelo and @VenkatAyyadevara to get detailed information.

As commented, there is support available to programmatically invoke OWA mail and calendar event compose form. Because this is based on URL params, there are a number of limitations, including the limit on URL length of around 2048 chars which essentially makes it not adequate for 'reply' scenarios (where you are likely going to want to append significant amount of content in the message body).

Compose new Message (Mail):

You need to append parameters to the Office365 OWA URL

Parameter Value
path  /mail/action/compose
subject Customer Service Request
body Add your request here
to service@domain.com

cc is not supported at this point.

For example:

https://outlook.office.com/owa/?path=/mail/action/compose

https://outlook.office.com/owa/?path=/mail/action/compose&to=service@domain.com&subject=Customer Service Request&body=Add+Your+Request+here

Compose a new appointment (Calendar):

You need to append parameters to the Office365 OWA URL

Parameter Value
path /calendar/action/compose
subject Sushi Training
body Remember to bring your force!
location Convention Center
startdt 2016-02-29T19:00:00
enddt 2016-03-01T00:00:05

For example:

https://outlook.office.com/owa/?path=/calendar/action/compose

https://outlook.office.com/owa/?path=/calendar/action/compose&subject=Sushi%20Training&location=Convention%20Center&startdt=2016-02-29T19%3A00%3A00&enddt=2016-03-01T00%3A00%3A05&body=Remember+to+bring+your+force!

Remember that for more complex scenarios, you have available Outlook API, mail, calendar and more

Experience:

The user experience when accessing the previous URLs is immersed in outlook web app (after login if required), and the user has the ability to open the mail or event through the right upper icon

Some screenshots to show the experience (Desktop - Firefox, Chrome, Explorer, Edge).

image for the Calendar event example

image for the mail example

Updated: 05/18/2017

  1. URL for mail has added a /owa/ section
  2. All the parameters should be in URL encoded(Hex value of the UTF-8 bytes), and
  3. Outlook domain could be https://outlook.office.com/ or https://outlook.live.com

Thanks @Lynnette Zhong

Bye!

P.S.

If your are migrating from Exchange OnPremise, review it as the process is different from those versions.

The message created, based on the options configured by the user, will be saved as draft.

There is an issue with to parameter not being populated. It will be resolved in following weeks. Update is now deployed.

Comments (3)

  1. Vasil L. Michev says:

    That's good news. The "To" field doesn't seem to get populated though. To be more precise, I can see it populated when the Compose window opens after I paste the link, however it gets cleared after the window finishes loading.

    Is there some document on TechNet/MSDN that details all the available parameters?

  2. Terry Hagan says:

    Great, the is something we've been looking out for for a while now, it would be even better if the "To" field was populated, nearly there though!

  3. Carlos hm says:

    @Vasil, @Terry, That behavior for To Field should be resolved in early february. Just check again in a few weeks.

    @Vasil, I have shared the design behavior, I will ask for documentation update

Skip to main content