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 for this type of application). On the favourites object is a Extended property call RawJson that contains all the information that is of interest eg.
For this post I've created an EWS script that first finds the above folder and then gets all the Shortcut Items in that folder and retrieves the rawJson extended property on each of the ShortCut Items. It then does a little bit more data abstraction from the Json to make it into a report-able object. So for instance we can do a
Quick view of what Shortcuts are being used (which clients,Last-Visted(for groups)and type) eg
In the above Legacy = Outlook Desktop and Outlook Services is the Outlook Mobile client on Android
Just the Personal favorites
The script for this post is available on GitHub https://github.com/gscales/Powershell-Scripts/blob/master/Favourites.ps1