Changing a login name in Office 365 when using On-Premises Active Directory

Asset 22

Changing a login name in Office 365 when using On-Premises Active Directory

Posted on 21 November 2016 by Beaming Support

You may notice that when you try changing a login name in Office 365 within Active Directory it won’t sync across to Azure Active Directory without a bit of PS script.

Here are our instructions for changing a login name in Office 365 within Active Directory, using some PS Script.

This will need to be run from the AAD Sync Server using the ‘Windows Azure Active Directory Module for Windows PowerShell’

You’ll need to use the below PS script to log into the admin account of Office 365 using this first:

Connect-MsolService

Login using the primary administrator account.

Then use the below to change login name:

Set-MsolUserPrincipalName -NewUserPrincipalName user@domain.com -UserPrincipalName user@domain.com

Asset 16

We answer real questions asked by businesses

From simple cyber security solutions to O365 migrations and everything in between. Take a look at our knowledge base and benefit from our expertise.

Businesses we’ve helped

Get the best of Beaming

Sign up to our monthly email updates on:

  • Easy cyber security advice anyone can follow
  • Research into what businesses are doing with their tech
  • How-to guides to boost productivity and efficiency

  • This field is for validation purposes and should be left unchanged.