So eventually you are going to run into the situation that we have you have to change a person’s login account (DOMAIN\username).
One of my clients is going through the process of changing the format of their login names and of course they asked how they should approach this.
The clients SharePoint site is pretty typical though they have some custom workflows which we have developed for them. Those workflows store usernames/groups which are used to assign tasks, generally security groups/SharePoint groups are used but there are times that an individual user is assigned.
This brings up a question, when a workflow is configured its setup should be recorded so that when maintenance such as this occurs the impact can be truely understood.
Below are the steps that we created for the successful renaming process.
- Make sure the user is logged out of the network
- Update the users account in Active Directory Users and Computers MMC. Use the rename function to rename the user’s account and name.
- Use stsadm -o migrateuser -oldlogin DOMAIN\oldusername -newlogin DOMAIN\newusername -ignoresidhistory
- Then we need to update the Sharepoint User Profile.
- Next we force a quick profile refresh.
- Finally we need to wait for the full profile refresh timer job.
We will start from Step 3 as the first two are explained.
Step 4 requires that the SharePoint User Profiles are updated from Active Directory.
- Access your SharePoint farm’s Central Admin website
- Browse to your Shared Service Provider which holds the domain account.
- Click on User Profiles and Properties
- Click on the Start Incremental Import link which will start the user profile import and will detect the change in the users details, there is no need to do a full import.
- Click Refresh to see that the import has finished.
- When the import has finished it the import status will say idle – completed (time duration).
Step 4 – Force a Quick user profile synchronisation
This step updates just the main user details such as loginname.
To force the change :-
- From the command prompt
- cd\ “%commonprogramfiles%\microsoft shared\web server extensions\12\bin”
- type stsadm -o execadmjobssvc.
- You should receive a command completed successfully.
At this point the username will be updated within each of the site collections. However first name and last name will not be fully updated until a Full profile refresh occurs. This timer job copies the userprofile information into the site collection.
Step 5 – Full Profile refresh
The full profile refresh occurs every hour on the hour, at the moment we don’t have a solution how to automatically force this to occur without changing the schedule of the timer job. We will be writing a tool hopefully which does this later on in the month.
It is possible to see when the workflow is going to run by viewing the Timer Job Status from Central Administration->Operations here it will tell you the last time the job run. The job runs every hour so just add an hour.
I hope that this is useful if you do have any other information thoughts please leave a comment.
>Hello Simon,I am working on similar situation of Active directory Rename, So is it possible for sharepoint to achieve Automatic profile synchronization based on the chane in active directory.