Get a list of mobile devices syncing with my tenant

Regular Contributor

Hi All


Hope everyone is well. Can someone perhaps assist me please?


I need to get list of all the mobiles devices that is currently syncing with my Office 365 tenant.


I found some scripts online but I am bit reluctant to use those.


Appreciate any advice...

2 Replies

You can try this script


$credential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $credential -Authentication Basic -AllowRedirection
Import-PSSession $Session

$mdevices = Get-MobileDevice -ResultSize Unlimited
$mdevices | Foreach-Object{
$mdevice = $_
$mstats = $mdevice | Get-MobileDeviceStatistics
New-Object -TypeName PSObject -Property @{
UserDisplayName = $mdevice.UserDisplayName
DeviceFriendlyName = $mdevice.FriendlyName
DeviceId = $mdevice.DeviceId
DeviceImei = $mdevice.DeviceImei
DeviceFirstSyncTime = $mdevice.FirstSyncTime
DeviceAdminDisplayName = $mdevice.AdminDisplayName
DeviceName = $mdevice.Name
DeviceLastSuccessSync = $mstats.LastSuccessSync
DevicePhoneNumber = $mstats.DevicePhoneNumber
Status = $mstats.Status
}|Export-csv -Path C:\result.csv -NoTypeInformation


If you don't want to use PowerShell, simply use the Exchange Online Admin Center? There is also an report in the O365 admin portal: