Hi @Kevin Nguyen
Generally SharePoint user profiles will get deleted when any of the below incident happens:
- User account is deleted in Active Directory
- Account is disabled
- User Profile Service Application Connection is changed or recreated
- Account is recreated in AD or moved out of an OU which is not part of SharePoint User Profile sync connection
However, sometimes you may have to delete SharePoint user profiles manually.
You could use powershell to delete user profile:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#Configuration Variables
$SiteURL = "http://mypage.crescent.com"
$AccountName="Crescent\Sherif"
#Get Objects
$ServiceContext = Get-SPServiceContext -site $SiteURL
$UserProfileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($ServiceContext)
#Get the User Profile
$UserProfile = $UserProfileManager.GetUserProfile($AccountName)
#remove user profile
$UserProfileManager.RemoveUserProfile($AccountName);
********************************************
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.