Change an office 365 username synced with Active Directory

Office 365

Office 365 usernames obtained from dirsync cannot be changed even if updated in Active directory. It maybe necessary to change them (eg, user gets married, entered incorrectly and synced).
First, update in AD
Next run powershell as an Administrator. You need to modify Microsoft windows azure directory (not exchange)
1. Connect to Windows Azure using the following:
Import-Module MsOnline
$cred = Get-Credential (enter your email address and password at prompt)
Connect-MsolService -Credential $cred

2. Run following cmdlet: ‘Set-MsolUserPrincipalName -UserPrincipalName –NewUserPrincipalName’
3. Force directory synchronization

No Comments

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Office 365
Import Contacts to Office 365 Global Address List

Office 365 doesn’t offer you a way to easily import a list of contacts into your company’s Global Address List (GAL). But it can be done quite easily with Powershell and a csv file of the contacts to import. First of all the csv file. There are some mandatory fields …

Office 365
Save Sent Items in Shared Mailbox

The default behavior for shared mailboxes is that the sent mail will go to the sent items folder of the senders mailbox. This means other users with shared access cannot see what has been sent from this mailbox. We can change this so the sent items are saved to the …

Office 365
Create a Dynamic Distribution Group of All Users in Office 365

Launch Powershell as an Administrator and connect to Office 365 Run New-DynamicDistributionGroup -IncludedRecipients MailboxUsers -Name “AllUsers” That’s it – Dynamic Distribution Group created. To check the membership of the group…… run $AllUsers = Get-DynamicDistributionGroup “AllUsers” Get-Recipient -RecipientPreviewFilter $AllUsers.RecipientFilter | FT DisplayName, Alias, PrimarySMTPAddress   Related