How to Modify attributes Bulk of Users on Office 365

Problem
I have many users on Office 365 who need to modify their attributes on Office 365. Those users are Cloud ID. How can do that?

This is an example of user that need to change.

256

Solution

  1. Create CSV file with Update attributes as below
  2. CSV

  1. Open Windows PowerShell Run As Administrator, and run “Import-Module Msonline”
  2. 259

  1. Connect to office 365 using below command
  2. Connect-MsolService

    260 261

  1. Edit in below Script and write path of CSV,  and Save it .ps1. Then Run it.
  2. $input=Import-Csv C:\Userdata.csv
    foreach($line in $input)
    {
    Set-MsolUser -UserPrincipalName $line.UserPrincipalName -FirstName $line.FirstName -LastName $line.LastName -DisplayName $line.DisplayName -Title $line.jobTitle -City $line.City -Country $line.Country -Department $line.Department -Fax $line.Fax -MobilePhone $line.MobilePhone -Office $line.Office -PhoneNumber $line.PhoneNumber -PostalCode $line.PostalCode -State $line.State -StreetAddress $line.StreetAddress
    }

    263

  1. Now Check users on Office 365 portal, it should be changed.
  2. 275

Advertisements
This entry was posted in Office 365, Office 365. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s