How to update user account details
So far we have seen how can we assign/remove bulk licenses for users. In this section, we will see how we can update user information such as DisplayName
, FirstName
, and LastName
.
Let's take an example of a user who recently got married and would like to change their last name, or a user who changed departments. The following command will work if you are storing accounts in the cloud only. If you have directory sync or don't have two-way sync, then you will need to do these kinds of change in local Active Directory:
Set-MSOLUser -UserPrincipalName [email protected] -LastName "NewLastName" -DisplayName "First Name New Last Name"
To verify the changes, use the following command:
Get-MSOLUser -UserPrincipalName "[email protected]"
You can also check this change out in the Office 365 admin center.