kennysarmy Posted July 9, 2019 Author Posted July 9, 2019 What we normally do is rename the active directory account and update the e-mail field to their new name. Using Attribute editor in AD, we add a proxyAddress value of SMTP:newname@ domain and smtp:oldname@ domain so they have an alias (and there is no need to move files) Then connect to Office 365 via powershell and run the following command to update the users login credentials Set-MsolUserPrincipalName -UserPrincipalName [email protected] -NewUserPrincipalName [email protected] In case this is the bit I'm missing I tried to do this but received an error back: Set-MsolUserPrincipalName : Access Denied. You do not have permissions to call this cmdlet. At line:1 char:1 + Set-MsolUserPrincipalName -UserPrincipalName qrt@schoolname ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: ( [set-MsolUserPrincipalName], MicrosoftOnlineException + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.UserNotFoundException,Microsoft.Online.Admini stration.Automation.SetUserPrincipalName
kennysarmy Posted July 9, 2019 Author Posted July 9, 2019 I think it's because it can't find the user: If I run : Get-MSOLUser -SearchString "qrf" | fl It returns : (amongst other things) UserPrincipalName : qrf@schoolname So I think the UserPrincipalName has been updated OK ( from qrt )
mdrabble Posted July 9, 2019 Posted July 9, 2019 Try running the powershell command as admin instead on opening powershell normally
kennysarmy Posted July 10, 2019 Author Posted July 10, 2019 Try running the powershell command as admin instead on opening powershell normally I was doing that, and also did my last post not show that the UserPrincipalName has already been updated? I'm way past head-scratching now
kennysarmy Posted July 10, 2019 Author Posted July 10, 2019 Actually, can anyone who has done the exact operation check an account for me and see if on "Exchange admin center" when editing a mailbox the *Alias entry on the General section still list the original username? Maybe it does n't update...
Danp Posted July 10, 2019 Posted July 10, 2019 A slightly different way to do things, we create the new account in AD and wait for it to show in O365 then I give them permissions to their old account and leave it to them to move what emails they want over, if any while I'll set a forwarder for any emails to the old account to go to the new mailbox.
elsiegee40 Posted July 10, 2019 Posted July 10, 2019 (edited) A slightly different way to do things, we create the new account in AD and wait for it to show in O365 then I give them permissions to their old account and leave it to them to move what emails they want over, if any while I'll set a forwarder for any emails to the old account to go to the new mailbox. I would find that extremely annoying. All I have done is change my name and I cannot pickup where I left off the day before. I want everything to carry on as it was. Not have to transfer stuff. This isn’t something I would ever inflict on a user. Why don’t/won’t you rename the account and use an alias for the former name @Danp? Edited July 10, 2019 by elsiegee40
Danp Posted July 10, 2019 Posted July 10, 2019 I would find that extremely annoying. All I have done is change my name and I cannot pickup where I left off the day before. I want everything to carry on as it was. Not have to transfer stuff. This isn’t something I would ever inflict on a user. Why don’t/won’t you rename the account and use an alias for the former name @Danp? Understandable. There has only been a handful of times this has been needed and it's not been an issue, one member of staff kept everything as it was and just had the display name changed (went from Smith to Smith-Jones)
Boredguy Posted July 10, 2019 Posted July 10, 2019 Actually, can anyone who has done the exact operation check an account for me and see if on "Exchange admin center" when editing a mailbox the *Alias entry on the General section still list the original username? Maybe it does n't update... This is my process once member of staff has confirmed they want to use their new name (or in 1 case revert to their previous name) - Rename Staff network folder to new name - Rename account in Active Directory - Update e-mail field for user in Active Directory, as well as Profile/home folder path - In Attribute Editor in User properties, add SMTP:newaddress and smtp: previousaddress to create alias - Wait for AD Sync to take effect for user changes to be updated to Office 365 (could take up 30 minutes) - Connect to Office 365 via Powershell - Run the Set-MsolUserPrincipalName command to update user. Make sure the old credential is the onmicrosoft domain one Once done, in the Office 365 Users, the member of staff should have the username/e-mail field as their new name. Their aliases will contain their old [email protected] (this never changes), as well as the alias set in AD for their old e-mail address. All e-mails, files, shortcuts etc remain exactly as they were before the name update
elsiegee40 Posted July 10, 2019 Posted July 10, 2019 Understandable. There has only been a handful of times this has been needed and it's not been an issue, one member of staff kept everything as it was and just had the display name changed (went from Smith to Smith-Jones) There’s no need to have a potential issue though. I would urge you to consider user convenience when this next occurs. Maybe you aren’t married to someone that changed their name. I am someone that has been through it. It’s bad enough carrying your marriage certificate everywhere for months to prove who you are now. There’s no reason for many of these obstacles these days. It’s not like it hasn’t been happening since long before the days of computers.
Danp Posted July 10, 2019 Posted July 10, 2019 (edited) There’s no need to have a potential issue though. I would urge you to consider user convenience when this next occurs. Maybe you aren’t married to someone that changed their name. I am someone that has been through it. It’s bad enough carrying your marriage certificate everywhere for months to prove who you are now. There’s no reason for many of these obstacles these days. It’s not like it hasn’t been happening since long before the days of computers. Ok, I get it, knuckles wrapped, sorry to have poked a sore wound. We can only talk from experience, and in mine, it's not been an issue. Don't know why it matters, but my wife did change her name and it was never an issue Edited July 10, 2019 by Danp
kennysarmy Posted July 10, 2019 Author Posted July 10, 2019 This is my process once member of staff has confirmed they want to use their new name (or in 1 case revert to their previous name) - Rename Staff network folder to new name - Rename account in Active Directory - Update e-mail field for user in Active Directory, as well as Profile/home folder path - In Attribute Editor in User properties, add SMTP:newaddress and smtp: previousaddress to create alias - Wait for AD Sync to take effect for user changes to be updated to Office 365 (could take up 30 minutes) - Connect to Office 365 via Powershell - Run the Set-MsolUserPrincipalName command to update user. Make sure the old credential is the onmicrosoft domain one Once done, in the Office 365 Users, the member of staff should have the username/e-mail field as their new name. Their aliases will contain their old [email protected] (this never changes), as well as the alias set in AD for their old e-mail address. All e-mails, files, shortcuts etc remain exactly as they were before the name update OK - I think I'm getting somewhere. In the Attribute Editor in User properties I was changing anything with the old surname to the new surname - including the entry "mailnickname" If I leave this as is then the command : Set-MSOlUserPrincipalName -UserPrincipalName "OLD-EMAIL" -NewUserPrincipalName "NEW-EMAIL" WORKS! Emails work correctly. However - in AD the mailnickname is still showing as the old name! Should I be worried?
Boredguy Posted July 10, 2019 Posted July 10, 2019 Regarding the mailnickname, I wouldn't worry too much, but then again we don't have that value set for anyone as it's an on premises Exchange setting 1
leegcvcc Posted July 10, 2019 Posted July 10, 2019 Name change in Papercut uses a specific command to change names see https://www.papercut.com/kb/Main/RenameUserAccounts 2
jthompson Posted July 10, 2019 Posted July 10, 2019 Slightly stunned at how much work this appears to be for O365! Using G Suite here and GCDS just picks up and applies any changes made to surname, display name, email address , etc. The only extra thing we have to to in G Suite is add their old email address as an alias. We recommend they keep that alias for at least a few weeks to pick up replies to recently sent messages, but we ultimately leave the decision up to them about whether or not that alias is kept active. On the AD side, we'll liaise with them on the timing of the change, but we just update their login name and user area. Heartily agree with @elsiegee40 that names changes need to be quick and painless for end users and to not be perceived as any 'trouble' for the IT staff. Name changes for users can go hand in hand with some difficult personal circumstances (family breakup, gender reassignment, divorce, etc.). Making users start over and fiddle about with their old name all over the screen could be a source of avoidable distress. 1
bald_pig Posted July 10, 2019 Posted July 10, 2019 Slightly stunned at how much work this appears to be for O365! Using G Suite here and GCDS just picks up and applies any changes made to surname, display name, email address , etc. The only extra thing we have to to in G Suite is add their old email address as an alias. We recommend they keep that alias for at least a few weeks to pick up replies to recently sent messages, but we ultimately leave the decision up to them about whether or not that alias is kept active. On the AD side, we'll liaise with them on the timing of the change, but we just update their login name and user area. Heartily agree with @elsiegee40 that names changes need to be quick and painless for end users and to not be perceived as any 'trouble' for the IT staff. Name changes for users can go hand in hand with some difficult personal circumstances (family breakup, gender reassignment, divorce, etc.). Making users start over and fiddle about with their old name all over the screen could be a source of avoidable distress. Any updates we've made here in g suite, the alias has been added automatically!
kennysarmy Posted July 10, 2019 Author Posted July 10, 2019 Slightly stunned at how much work this appears to be for O365! Using G Suite here and GCDS just picks up and applies any changes made to surname, display name, email address , etc. The only extra thing we have to to in G Suite is add their old email address as an alias. We recommend they keep that alias for at least a few weeks to pick up replies to recently sent messages, but we ultimately leave the decision up to them about whether or not that alias is kept active. On the AD side, we'll liaise with them on the timing of the change, but we just update their login name and user area. Heartily agree with @elsiegee40 that names changes need to be quick and painless for end users and to not be perceived as any 'trouble' for the IT staff. Name changes for users can go hand in hand with some difficult personal circumstances (family breakup, gender reassignment, divorce, etc.). Making users start over and fiddle about with their old name all over the screen could be a source of avoidable distress. I think it's only work for people like me who are getting to grips with a new system and way of doing things. It was my bad for doing things perhaps out of sequence and changing items not required to be edited.
Boredguy Posted July 10, 2019 Posted July 10, 2019 The only thing with 365 is accounts always retain their original tenancy.onmicrosoft.com account address regardless of any changes you make to their alias, username etc which is why there is the additional powershell step to change the default login address across to the new one. Once you've done the change a few times (and saved the powershell script) it's a 30 second task to update the login credential.
jthompson Posted July 10, 2019 Posted July 10, 2019 Any updates we've made here in g suite, the alias has been added automatically! (That does ring a bell, actually)
kennysarmy Posted July 11, 2019 Author Posted July 11, 2019 Just to add in further testing we found we had to do these two operations the other way around: Instead of: - Wait for AD Sync to take effect for user changes to be updated to Office 365 (could take up 30 minutes) OR run start-adsyncsynccycle -policytype delta - Connect to Office 365 via Powershell - Run the Set-MsolUserPrincipalName command to update the user's "username". We had to do: - Connect to Office 365 via Powershell - Run the Set-MsolUserPrincipalName command to update the user's "username". - Wait for AD Sync to take effect for user changes to be updated to Office 365 (could take up 30 minutes) OR run start-adsyncsynccycle -policytype delta
witch Posted July 15, 2019 Posted July 15, 2019 Sorry to hijack - same thing here but we dont sync with AD (yet) I understand adding in the new email address and having the old one in there as an alias- but what about her past emails? Will she have to log on using her old name to see them?
Boredguy Posted July 15, 2019 Posted July 15, 2019 With the account rename, all the e-mails are still in the current account so as far as the user experience is concerned, all they are doing is using their "new" username to login to their account as per normal. All the previous mail, calendars etc are accessible just as they were before the account name change. 1
witch Posted July 15, 2019 Posted July 15, 2019 I have just changed the prime to her new name so her old name is now an alias - is that the same?
Boredguy Posted July 15, 2019 Posted July 15, 2019 It's effectively the same. If you double check that the Username/Email field matches the new name, then you are fine. If the username does not match the new name, then you will need to run the powershell command that was posted previously to update the account so it knows to use the new e-mail address as the main login credential and not alias.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now