Outlook Mobile Connects with Microsoft Sync Technology or an Older Protocol
In my Petri.com article about the new architecture (aka, “Microsoft Sync Technology”) Microsoft is deploying to connect Outlook for iOS and Android devices to Exchange Online and Outlook.com, I mention a Microsoft FAQ on the topic. That FAQ includes some PowerShell code to help administrators know what protocol devices use to connect. The code is perfectly good, but being PowerShell, there are many ways to approach a problem and some to improve the solution. Here’s my attempt to do so.
The single-line command (always good) in the FAQ uses the Get-MobileDevice cmdlet to retrieve a list of devices that have connected to Exchange Online, extracts the devices running the iOS or Android client, and reports the protocol each device uses. All good, but the data would be more valuable if you knew who used the devices as well.
Mailboxes, Not Mobile Devices
My solution takes a user-centric approach to the question. The first step to know who is using Outlook for iOS or Android to connect to Exchange Online is to create a set of user mailboxes as they’re the only Exchange objects that can have mobile devices.
Next, we go through the list of mailboxes and use the Get-MobileDeviceStatistics cmdlet to examine details of mobile devices that have “partnerships” with each mailbox. We’re only interested in devices that report running Outlook for iOS or Android. If we find such a device, we grab the statistics like the O/S version running on the device and the date and time of the last successful synchronization. To know what architecture the device uses, we examine the ClientType property, which is “REST” if the device connects using the old architecture, or “Outlook” for the new.
[array]$Mbx = (Get-ExoMailbox -RecipientTypeDetails UserMailbox -ResultSize Unlimited | Select-Object Alias, DisplayName) Write-Host "Processing" $Mbx.count "mailboxes" $Report = @() ForEach ($M in $Mbx) { Write-Host "Checking devices for" $M.DisplayName $Devices = (Get-MobileDeviceStatistics -Mailbox $M.Alias | ? {$_.DeviceModel -eq "Outlook for iOS and Android"}) If ($Devices.Count -eq 0) { Write-Host $M.DisplayName "has no Outlook Mobile devices"} Else { ForEach ($D in $Devices) { $ReportLine = [PSCustomObject]@{ User = $M.DisplayName Device = $D.DeviceFriendlyName OS = $D.DeviceOS SyncType = $D.ClientType LastSync = $D.LastSuccessSync} $Report += $ReportLine } } }
Examining Connection Details
To see what data our code generates, we examine the $Report variable.
$Report | Format-Table User, Device, SyncType, Lastsync, OS User Device SyncType LastSync OS ---- ------ -------- -------- -- Deirdre Smith Outlook for iOS REST iOS 12.1 Deirdre Smith Outlook for iOS REST 24 Aug 2018 17:30:53 iOS 11.4.1 Deirdre Smith Outlook for iOS REST 4 Dec 2018 21:27:16 iOS 12.0 James Ryan Outlook for iOS REST 10 Oct 2018 16:22:52 iOS 12.0 Tony Redmond Outlook for iOS REST 1 Oct 2017 18:13:27 iOS 10.3.3 Tony Redmond Outlook for iOS REST 4 Dec 2018 22:32:34 iOS 12.0
At the time of writing, clients in my tenant still use the REST protocol that’s soon to be replaced by the Outlook protocol. See the Petri.com article for details.
Of course, if we need to do some deeper analysis, we can output the information to a CSV file with another command. The CSV file can then be loaded into Excel or Power BI to slice and dice the data, generate graphs, and so on.
$Report | Export-CSV -NoTypeInformation c:\temp\OutlookMobileDevices
Easy!
For more information about Office 365 clients, read Chapter 10 of the Office 365 for IT Pros eBook, while Chapter 18 covers mobile devices.
3 Replies to “How to Report the Connection Protocol Used by Outlook Mobile Clients”