Customising the default icon of an Office Add-in for Outlook

Symptoms When you install an add-in from the Office store, it will come with a predefined set of icons. Depending on your organisation’s needs, you might need to change those. More Information The icons Outlook will display are defined in the add-in manifest, which you can extract using Fiddler. You would need to locate the…


GetFolder sometimes returns an incorrect TotalCount when issued against a Public Folder mailbox hosted in Office 365

Symptoms When issuing an Exchange Web Services GetFolder request to a public folder mailbox hosted in Office 365 Exchange Online, the TotalCount returned in the response may incorrectly show a value of 0.  More Information Office 365 Exchange Online engineering have confirmed this as a known architecture limitation that we are not planning on addressing…


How to decrypt and un-sign a message programmatically using the OOM

Overview This blog post demonstrates how to decrypt and un-sign a message programmatically using the Outlook Object Model.   Encrypt email messages When you need to protect the privacy of an email message, encrypt it. Encrypting an email message in Outlook means it’s converted from readable in plain text into scrambled cipher text. Only the…


Outlook behaviour when accessing data in a corrupt data file (.pst or .ost)

In Outlook 2010 and previous versions, when making a call to access data in an Outlook store, programmatic calls to access data would result in errors if the data file (.pst or .ost) was corrupt. Developers were thus able to handle the exceptions and continue the execution,   In Outlook 2013, this behaviour changed and…


Authenticating against Exchange Web Services using certificate based OAuth2 tokens

Overview This post contains step by step information on configuring your environment and authenticating against Exchange Web Services using certificate based OAuth2 tokens. The information in this blog post is only valid for connecting to Exchange Online mailboxes. Requirements In order to set up certificate based OAuth2 authentication you will require access to the Azure…


Acquiring OAuth2 access tokens for automating Exchange Management Shell cmdlets

Overview At present, there are no configurable permissions available for new Application Registrations in Azure Active Directory allowing to acquire OAuth2 tokens for automating Exchange Management Shell cmdlets. This work is currently being investigated by engineering and we hope to be in a position to provide such functionality in the future. That said, there is…


Troubleshooting EWS Applications using SOAPe

SOAPe is a tool that was developed primarily for testing and troubleshooting EWS, though can also support other web services.  It has a built-in EWS trace analyser that can assist in identifying issues and spotting errors. SOAPe is available from Github, and full source is published: https://github.com/David-Barrett-MS/SOAPe Analysing EWS Traces The EWS Managed API (also available…


Forwarding a message as an attachment using Graph or REST

There isn’t currently an easy way to forward a message as an attachment using REST, as the message: forward command does not have this option.  However, with the beta API, it is now possible to forward as attachment using the following technique.  Note that it is only possible to retrieve the MIME content of the…


Querying the Office 365 Management APIs using Postman

Overview This blog post demonstrates how to create an app registration in Azure Active Directory and how to use PostMan to test access and query the Office 365 Management Activity API and Office 365 Service Communications API. For troubleshooting information please visit the official page: Troubleshooting the Office 365 Management Activity API. Note: Service Communications…


Azure Daemon Application using EWS with OAuth

We’ve got a fair few samples for implementing a daemon application (one that requires no user interaction) using OAuth against Azure endpoints, but I couldn’t find a specific example for EWS.  This guide describes how to set up an application (register it in Azure) and then obtain the correct permissions to be able to run…