In this article, I'll show you to retrieve Office 365 user account details with the help of PowerShell.


Download and install the following modules.

  1. Microsoft Online Service Sign-in Assistant for IT Professionals RTW
  2. Windows Azure Active Directory Module for Windows PowerShell (64-bit version)

View Office 365 User Account Details in PowerShell

- Open PowerShell with elevated privileges.

- Execute the following command. When you are prompted, enter your O365 global admin account or an account having required privileges.

$credential = Get-Credential

- Execute the following command to connect to O365.

Connect-MsolService -Credential $credential

- Execute the following command

Get-MsolUser -UserPrincipalName "<User account name>" | Select-Object *

For example, to get the details of "Belinda" user, you should issue following command.

Get-MsolUser -UserPrincipalName "[email protected]" | Select-Object *

You can filter out some of the properties by issuing following similar command.

Get-MsolUser -UserPrincipalName "<User account name>" | Select-Object DisplayName, Department, UsageLocation


How to View Office 365 User Account Details in PowerShell

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *