คำตอบ Username changed in AD, now two entries are showing up in Address Book

  • 8 สิงหาคม 2555 18:27
     
     
    We have noticed two issues with people who have had their usernames changed in AD.  First for these people, there are now 2 entries in the SharePoint "Address Book".  One entry with their new username and one with thier old.

    The second is when these people submit infopath forms or list items with SPD workflow emails attached to them, the username being submitted with these is their old usernames.  This is causing issues, because we are using these emails to submit items to a 3rd party application which of course, can not resolve their old usernames.  Any ideas on the best way to resolve this?  Thanks!

    Nick Hurst

ตอบทั้งหมด

  • 8 สิงหาคม 2555 18:45
     
     คำตอบ มีโค้ด

    You want to move the old user account to point to the new user reference.  The basic syntax for this in PowerShell:

    Move-SPUser –Identity "DOMAIN\OriginalLogin" -NewAlias "Domain\NewLogin"
    
    Good luck!

    Chris McNulty MCSE/MCTS/MSA/MVTSP | blog http://www.chrismcnulty.net/blog | twitter @cmcnulty2000 Microsoft Community Contributor Award 2011

    • ทำเครื่องหมายเป็นคำตอบโดย Rock Wang– MSFT 16 สิงหาคม 2555 11:01
    •  
  • 16 สิงหาคม 2555 14:49
     
     

    The PowerShell code worked, thanks Chris!

    So we've been doing some testing and it would appear there are 3 issues that appear when a username is changed.  One is on any site the user has visited, they will now have 2 profiles in the phonebook.  Two is if they submit infopath forms or if SPD workflows grab their username, their old username is used.  Three, their My Profile link under their name dropdown, still has their old username as part of the URL so it will not work.

    Running the PowerShell code fixes all three.

    Now the bad, this seems to occur with every username change in our environment.  And, the powershell script will not work if the username has been changed twice before you run the script.  We had this same issue in SharePoint 2007 that we had to run a stsadm script for, I can't believe that Microsoft can't fix an issue that has been around for more than 6 years between two of their own systems. 


    Nick Hurst