With MSOnline you can extract & search for users in a domain after obtaining a domain account.
- Install MSOnline
- Search & Dump Commands
- A window should appear where you will have to login to microsoft using your domain credentials.
Search & Dump Commands
The following commands can be run without exporting to a file FYI.
Dump all Users
Get-MsolUser | Export-CSV users.csv
Dump first 1000 Users
Get-MsolUser -MaxResult 1000 | Export-CSV users.csv
Search Users by Name
Get-MsolUser -SearchString "Alex" | Export-CSV users.csv
Search Users by Email