Answered by:
Sharepoint 2013 user profile removal for disabled Active Directory User Account

Question
-
I am using the Sharepoint 2013 Active Directory Import mode to sync between Active Directory (specific OUs) with Sharepoint user profile. I would like to have the user profile deleted when the user's Active Directory account is disabled. Can this be done out of the box sharepoint? Also please confirm only AD user account deletion will trigger user profile removal. Any other method like moving to another OU will not work.
If not any suggestion via script or other methods to remove user profile for user account disabled.
Thanks.
Bobby
Friday, August 16, 2013 3:05 AM
Answers
-
Hi,
Please refer to the following articles, you may need to tweak some PowerShell scripts to achieve your task.
PowerShell Tools - Removing Orphaned Users from SharePoint
Account Deletion and SharePoint 2010 User Profile Synchronization
Inside the SharePoint 2010 My Site Cleanup Timer Job
**Please mark as answered and/or helpful as appropriate
Recently added Gallery: PowerShell Script for Creating Site Collection with Host Headers
http://gallery.technet.microsoft.com/PowerShell-Script-for-7b319476
- Edited by Mokhtar Bepari Friday, August 16, 2013 3:35 AM updated
- Marked as answer by tracycai Sunday, August 25, 2013 6:38 AM
Friday, August 16, 2013 3:35 AM
All replies
-
Hi,
Please refer to the following articles, you may need to tweak some PowerShell scripts to achieve your task.
PowerShell Tools - Removing Orphaned Users from SharePoint
Account Deletion and SharePoint 2010 User Profile Synchronization
Inside the SharePoint 2010 My Site Cleanup Timer Job
**Please mark as answered and/or helpful as appropriate
Recently added Gallery: PowerShell Script for Creating Site Collection with Host Headers
http://gallery.technet.microsoft.com/PowerShell-Script-for-7b319476
- Edited by Mokhtar Bepari Friday, August 16, 2013 3:35 AM updated
- Marked as answer by tracycai Sunday, August 25, 2013 6:38 AM
Friday, August 16, 2013 3:35 AM -
hi
Did you find a solution.I need to do something similar
Thursday, October 17, 2013 7:47 PM -
I also need to know the answer to this. I'm assuming from Bepari's response that it is not possible with off the shelf SharePoint 2013 implementation and we need to augment with PowerShell process? Or am I just missing a configuration element of the User Profile Service??? Anyone?Wednesday, January 22, 2014 11:09 PM
-
There is Out-of-the-box solution for this. It is exclusion filters for a synchronization connection.
Please see below link.
http://social.technet.microsoft.com/Forums/en-US/32ee6549-9f45-4893-9a88-1b7b8ffa8f62/removal-of-disabled-ad-users-in-sharepoint-2010-user-profile?forum=sharepointadminprevious
- Edited by Matias.Koppinen Thursday, April 3, 2014 9:07 AM
- Proposed as answer by Martin Reichelt Tuesday, September 23, 2014 2:04 PM
Thursday, April 3, 2014 9:06 AM -
Matias is right. 2013 version of Exclusion Filters documentation could be found on TechNet: http://technet.microsoft.com/en-us/library/ee721049(v=office.15).aspx (see paragraph 2.2. Define exclusion filter for a synchronization connection).
In your scenario you'll need create filter like this:
"userAccountControl"
"bit on equals"
"2"
- Edited by Martin Reichelt Tuesday, September 23, 2014 2:13 PM
Tuesday, September 23, 2014 2:07 PM