Skip to main content

Posts

Showing posts with the label OWA

Reporting on the Favorites Shortcut items in Outlook, OWA and Outlook Mobile using PowerShell and EWS

One of the email UI features that I find the most useful in Outlook on the Web and Outlook mobile is the People favorites feature which saves having to do a search for historical email from particular high use contacts. Favorites is a feature that has evolved especially in Outlook on the web and Outlook mobile eg People/Persona favorites and category favorites. The way this is implemented in the Mailbox is interesting eg   People/Persona favorites get their own search folder under the favoritePersonas Folder in the Non_IPM_Subtree in a Mailbox eg As well as a configuration object under the  \ApplicationDataRoot\32d4b5e5-7d33-4e7f-b073-f8cffbbb47a1\outlookfavorites eg The configuration object is of interest as this tells as a lot about what type of favorites are being created and used in a Mailbox. It also can serve in a custom app if you want to reproduce the same type of favorites folder tree (you will need to use EWS for this as the Graph API is unfortunately hamstrung ...

Email Header IpAddress GeoIP report Addin for Outlook and Outlook on the Web in Office365

Something that can be useful from time to time when looking at email delivery issues or email threats is to be able to see the Geographical regions that an email has traversed in its delivery. Usually this information gets stored in the Email Header in the received headers but also depending on the client and services being used the Source IpAddress of the client and other intermediaries may get written in other properties. Because I needed something last week to do this and couldn't find any other addins to do this I created a pretty simple Outlook addin that Gets the headers from a Message using the REST API in Office365 Uses a RegEx to get all the IPAddresses from that header Uses a Set in JavaScript to then de duplicate these IPAddresses Then I used one of the many free GeoIP web services out there to query each of the returned IPAddresses from the Regex matches and finally display the result in a table but to Outlook For example here is what it returns where run aga...

How to enable Dark mode in Outlook on Web in Office365 with EWS and PowerShell

Last year at Ignite Microsoft announced Dark mode for Outlook On the Web , while this seem to excite a lot of people I never really caught the buzz. However after taking the plunge after being notification bugged by Outlook this week I've found it to be a nice addition especially if your eyes aren't 100%. When you enable Dark mode using the slider in Outlook on the Web   This changes/creates a setting called " isDarkModeTheme " in the OWA.UserOptions User Configuration Object which is held in the FAI collection (Folder Associated Items) in the Non_IPM_Root of the Mailbox. If you want to enable this setting for a user (or users) programmatically or just want to take stock of who is using this then you can use EWS to Read and Set the value in the  OWA.UserOptions User Configuration Object in a Mailbox. (if you want to do this in the Microsoft Graph you will need to cry into your beer at the moment because the Microsoft Graph still doesn't support either user ...

Sender Sentiment and Sender Mail Tips Mail Addin for Office365

Mail Addin's are a feature of Exchange and Office365 introduced first in 2013 as a way of having a unified Client App experience across Outlook, OWA and now the Outlook mobile clients (vs the old Com based addin which still works but in Outlook only). One of the new features in MailApps in Office365 is the ability to now use the Outlook REST endpoint (EWS has been available in Mail Addin's since release). While both EWS and REST are functionality the same (eg they both are Mailbox data API's) in terms of their use in a Mail Addin the REST API offers a faster and easier development experience over EWS. Primarily because in EWS you have to build your SOAP posts in XML and parse their results which if you have worked with XML in Javascript is never a trivial thing. REST on the other hand because your requests and responses are using JSON (JavaScript Object Notation) from a integration perspective this is easier to handle and debug in JavaScript which is the primary language yo...

Using OWA's Pin email feature using EWS in Office365 and Exchange 2016

Pinning email is a new feature that is available in OWA(or Outlook on the Web) on Office365 and Exchange 2016 and a much requested feature in Outlook  https://outlook.uservoice.com/forums/322590-outlook-2016-for-windows/suggestions/12963459-pin-or-stick-important-emails-at-the-top-of-your-I What happens when you pin an Email in OWA is it sets two MAPI properties on the backend when pinned the value will look like the following the value 1/9/4500 is significant and is used when an Item in Pinned in the UI, When the Item is Unpinned in the UI 0x0F01 reverts back the current time and  0x0F02 is removed from the item. So in EWS if you want to display all the Pinned email you can use a SearchFilter to filter the Item based on the value of this property eg  $PR_RenewTime2 = new-object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition(0xF02,[Microsoft.Exchange.WebServices.Data.MapiPropertyType]::SystemTime);  $SfSearchFilter = new-object Microsoft...

Finding the TimeZone being used in a Mailbox using EWS

If you ever have the need to create a number of events in user mailbox's from a central application or Script where the target Mailboxes span across different time zones then finding each target Mailbox's timezone is a critical thing. In this post I'm going to outline a few different methods of getting the TimeZone using EWS. If you have access to the Exchange Management Shell cmdlet's to find the users configured timezone you can use either the Get-MailboxCalendarConfiguration or Get-MailboxRegionalConfiguration cmdlets which show you the timezone settings of a Mailbox from the WorkHours configuration of that mailbox. The object in the Mailbox that the information is read from/stored in is the IPM.Configuration.WorkHours FAI (Folder Assoicated Items) object in the Calendar Folder of the Mailbox. So if you want to access the TimeZone setting in Mailbox just using EWS you need to Bind to this UserConfiguration object (FAI object) and th...

OWA Voting Buttons Compose App for Office365/Exchange 2016

OWA or Outlook on the Web have never quite had the feature parity with the desktop version of Outlook which can be a point of frustration for those primarily using it. Although interesting in Office365 new features like clutter, sweep etc are now lighting up in the OWA first before they make their way into new desktop releases. One of the things you haven't been able to do previously with OWA is create an Email with voting buttons. With compose apps and some of the recent changes in version 1.3 of the API which I posted about here , you now have the ability to add some of this functionality back in. Actually with a little imagination you also have the ability to actually build something a lot better then the voting buttons feature which have been around in Exchange for some time. But in this post I want to show how you can create a Compose Mail App that uses EWS to make changes to the draft message to enable the feature. One thing also to note i...

Setting properties via EWS on a Draft message in a Compose Mail App

With the latest updates that have been released recently for Compose apps that are now available in OWA in Office365 and the Office/Exchange 16 preview the ability to extend what your compose apps can do has been greatly enhanced. With version 1.3 of the API you can now save an Item via the saveAsync method https://msdn.microsoft.com/en-us/library/office/mt269096.aspx  . Why this small change is important from an extensibility point of view is that when you save an Item this way, it creates a draft in the Mailbox you activated the compose app from which you can then modify anyway you like using the EWS updateItem operation. (normally you would be restricted in a compose app to just using the subset of properties and methods provided for in the Office.js). One trick however is the ItemId which you need to make an UpdateItem EWS Request to update the Draft Item is still only available in Read Mode. So to get around this I've come up with t...

Text Emoticon Outlook and OWA Compose App

Emojis and emoticons have been around for quite a while but are picking up a bit of steam of late with the release of Windows 10. The Daily mail had a really good article on their use recently which is worth a read. Like everything these new emoji's have there origins  story and text based emoticons (which have many other names) are kind of a interesting sub branch with a slightly retro feel. In this post I'm going to show you how you can create a Mail App to make using text emoticon's easy in Exchange 2013 and Office365 using the new compose apps feature which was introduced last year at MEC. Compose apps are one way of easily extending the User interface in OWA and Outlook 2013 (and 2016). So for this example I can do something like the following to make these text emoticons easy to insert into either the Subject or Body of a message (you need to active the app by selecting the Addin Button in OWA or Apps for Office in Outlook) At this point it should ...

Configure the default calendar view in OWA in Exchange 2013 and Exchange Online using EWS and Powershell

If you are after a higher level of control over the default setting in OWA, EWS offers you the ability to configure many of the default setting by modifying the FAI (folder associated Item) configuration item that controls that setting. One example of a setting that you can modify is the default view of the calendar in OWA  eg  the following setting When are user makes a change to this setting in OWA, the setting is stored in an FAI item with an Item Class of OWA.ViewStateConfiguration in a roaming dictionary property called CalendarViewTypeDesktop. The values for each of the setting are 1 = Day 2 = Week 3 = Work week 4 = Month The following script first checks to see if the OWA.ViewStateConfiguration config item exists (on a new mailbox if the user has never logged into OWA it probably wont exist). To use this script you run it with the name of the Mailbox you want to run it against and the value for the enum you want to use eg to...

Turning off the Reading / Preview Pane on all folders in OWA in Exchange 2013 and Exchange Online in EWS with Powershell

Exchange 2013 and Exchange Online has a cool new feature in OWA to let you control the Reading pane setting on all folders in your Mailbox in OWA eg. (in previous versions you had to manage it yourself per folder). When you set this setting in OWA and check the "Apply to all folders" box, in your mailbox it sets a configuration setting called GlobalReadingPanePosition in the OWA.UserOptions FAI (Folder Associated Item) in the Non_IPM Root of your Mailbox. The following values control the position of the Reading Pane on all folders 0 - Hides the Reading Pane 1 - Shows the Reading Pane on the Rights (this is the default) 2 - Shows the Reading Pane at the bottom To Access this FAI Item in EWS you use the UserConfiguration class which makes accessing the Roaming Dictionary structure where this particular value is held really easy. Eg the following script will turn the Reading pane off on all Folders in the mailbox its ran against. I've put a download of this script ...
All sample scripts and source code is provided by for illustrative purposes only. All examples are untested in different environments and therefore, I cannot guarantee or imply reliability, serviceability, or function of these programs.

All code contained herein is provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.