SharePoint Online: Delete User from User Information List

Problem: Deleted user accounts still appears in SharePoint Online People Picker! Need to remove user from user information list!

Root Cause: When a SharePoint Online user browses to a site, SharePoint creates an entry in “User Information List” to cache the user information. SharePoint syncs this list from the user profile when the user create/edit/update/delete items. When the user is deleted in Office 365 Azure AD, their related entry in UserInfo list is not removed.

How to Delete User from User Information List in SharePoint Online?

To delete a user from user information list, follow these steps:

  • Navigate to the URL in the browser to: https://YourDomain.sharepoint.com/_layouts/15/people.aspx?membershipGroupId=0
  • This takes you to the “All People” View. Now you can select and remove users from this User Information List by Clicking on Actions >> Delete User from Site Collection, and then confirm the prompt.
    delete user from user information list sharepoint online

This deletes user from user information list in SharePoint Online.We can also Remove user from user information list in SharePoint Online using PowerShell.

Orphaned users are those who don’t exist in the authentication provider, such as Active Directory, but still be in the “User Information List” and appears in People Picker!

SharePoint Online: PowerShell to Remove User from User Information List

Let’s use PowerShell to remove the user(s) from the user information list in SharePoint Online.

#Import SharePoint Online module
Import-Module Microsoft.Online.SharePoint.Powershell -DisableNameChecking

Function Delete-SPOUser()
{
param
    (
        [Parameter(Mandatory=$true)] [string] $AdminCenterURL,
        [Parameter(Mandatory=$true)] [string] $SiteURL,
        [Parameter(Mandatory=$true)] [string] $UserID       
    )
    Try {
        #Get Credentials to connect
        $Cred = Get-Credential
    
        #Connect to SharePoint online
        Connect-SPOService -Url $AdminCenterURL -Credential $Cred
 
        #Remove user from user information list
        Remove-SPOUser -Site $SiteURL -LoginName $UserID
        Write-host -f Green "Removed the User '$UserID' from $SiteURL"
    }
    Catch {
    write-host -f Red "Error Deleting Orphan Users!" $_.Exception.Message
    }
}

#Set Variables
$AdminCenterURL="https://crescent-admin.sharepoint.com/"
$SiteURL="https://crescent.sharepoint.com/"
$UserID="chauhan.ajay_synechron.com#EXT#@crescent.onmicrosoft.com"

#Call the function to delete the user from user information list
Delete-SPOUser -AdminCenterURL $AdminCenterURL -SiteURL $SiteURL -UserID $UserID

Since the people picker caches search results, you may have to close your current browser sessions, clear cache-cookies for the changes to reflect. Here is my another post to get all orphan users in SharePoint Online and delete them: SharePoint Online: Find and Delete Orphaned users using PowerShell

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

Leave a Reply