Active Directory, Exchange, Windows, Lync, Skype for Business and Office 365 how-to's and tips and tricks as we pick them up. Feel free to pass on anything you see here, and PLEASE subscribe to our RSS feed, and leave comments if you find our posts helpful!

Thursday, August 21, 2014

How to view your "Cloud Only" users in Azure AD Powershell

I ran into an issue recently with a customer who had populated their cloud with users manually, and then ran DirSync to synchronize 1000s of user accounts. We then had a need to audit the cloud only accounts and come up with a plan to remove them. I found this to be a very effective way to address this.

Get-MsolUser -All | where { $_.ImmutableId -eq $null }

The ImmutableId field is created when users are synchronized from an external directory, so users without a ImmutableId are not from Active Directory.