How to identify user who is using iOS / Android Outlook App

Not applicable



Hoping someone can help - been pulling my hair out on this for the last few weeks. Would anyone have a handy PS script which would identify which users are using the iOS / Android Outlook App.


We have a tenant with approx. 40,000 users in, some F1, E1 and E3 - As we're a enterprise I need a way of identifying users who are on a F1 or E1 licence and ask them to remove as F1 / E1 licence doesn't cover the iOS / Android Outlook app.


I've tried running the Mailbox App report in the portal but it doesn't tell me which licence the user is on or really identify if their using the iOS / Android Outlook app.

Thanks for any help anyone can give in advance.

2 Replies

The Email app usage report in the portal is a good starting point. If you want the exact device details, you will have to use the PowerShell cmdlets (Get-MobileDevice, Get-MobileDeviceStatistics). As both the iOS/Android Outlook apps use the same method to connect, you should be able to easily filter just those users/devices via:

Get-MobileDevice -RestApi -ResultSize unlimited


Adding the exact license information will require additional runs of the Get-MsolUser/Get-AzureADUser cmdlet or correlating via the report available in the portal.

You can try below script and this script will correlate with username, license and mobile device


$cred = Get-Credential

#connecting Exchange Online 
$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "" -Credential $cred -Authentication "Basic" -AllowRedirection
Import-PSSession $exchangeSession -DisableNameChecking

#conneting Msolservice
Connect-MsolService -Credential $cred

#Don't forget to Provide correct path
$LicenseMappingPath = "C:\Licmap.txt"
$content = ( Get-Content $LicenseMappingPath | Out-String )
$licname = ( Invoke-Expression $content )

#get user details with license
$user= Get-MsolUser -all |Where-Object { $_.isLicensed -eq $true } |select UserPrincipalName,Licenses
$Userdetails = $user |% {
     Write-Progress -Activity "Get Users" -Status "$j% User:"
    $lname= @()
    foreach ($l in $lic) 
        $lname +=$Licn
        $Licn =$null
    New-Object -TypeName PSObject -Property @{
          username = $_.UserPrincipalName
          Licence = $lname -join ","
    $lname = $null
}|select username,Licence

#Get Mobile device with license details
$Userdetails | % {
    $Userdetail = $_
    $mobiledetails= Get-MobileDevice -Mailbox $_.username -ErrorAction ignore | select UserDisplayName,DeviceOS
    if($mobiledetails.DeviceOS -ne $null)
    Write-Progress -Activity "Get Mobile details" -Status "$i% Mobile Device:"
      New-Object -TypeName PSObject -Property @{
          UserPrincipalName = $Userdetail.username
          Licensename = $Userdetail.Licence
          Devicetype = $mobiledetails.DeviceOS
          UserDisplayName = $mobiledetails.UserDisplayName

} |select UserPrincipalName,Licensename,Devicetype,UserDisplayName |Export-Csv -Path "c:\Exportmobildetails.csv" -NoTypeInformation

Note: Before run the script change following vlaue  in the script

-Path "c:\Exportmobildetails.csv"