User Information List - Sharepoint online

Marija Zorić 21 Reputation points
2023-10-23T10:37:48.8566667+00:00

Hi,

when I open User information list settings it says that the item number in the list is 6248, but when I open detail or list view I see only cca 300 people.

How can I see the full list with 6248 items, is it possible to see full list with browser? I would like to delete some items from the list, but I can't find the way to open full list where are 6248 items stored.

Image

I am, also, familiar with list view threshold. I have included modern experience, added indexes and have no grouping or sorting by the column.

I can open user information list via url: mydomain/_catalogs/users/detail.aspx, and I can see content of the list:

Image

Is there a way to "permanently" store UserInformationList library to Sharepoint Online site content, and from there to manage users (delete them)?

When I open url: mydomain/_layouts/15/people.aspx?membershipGroupId=0 I am still unable to see full content (6248 items), I see only about 300.

BR,

Marija

Microsoft 365 and Office | SharePoint | For business | Windows
{count} votes

2 answers

Sort by: Most helpful
  1. Yanli Jiang - MSFT 31,596 Reputation points Microsoft External Staff
    2023-10-25T06:12:08.89+00:00

    Hi @Marija Zorić ,

    It is recommended that you use PowerShell to export the user information list to a CSV file so that you can see all users.

    #Load SharePoint CSOM Assemblies
    Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
    Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
     
    #Parameters
    $SiteURL="https://tenant.sharepoint.com/sites/sitename"
    $CSVPath = "C:\Temp\UserInfo.csv"
     
    #Get Credentials to connect
    $Cred= Get-Credential
     
    Try {
        #Setup the context
        $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
        $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)
     
        #Get the User Information List
        $List=$Ctx.Web.SiteUserInfoList
        $FieldColl = $List.Fields
        $Ctx.Load($List)
        $Ctx.Load($FieldColl)
        $Ctx.ExecuteQuery()
      
        #Get All Items from User Information List
        $ListItems = $List.GetItems([Microsoft.SharePoint.Client.CamlQuery]::CreateAllItemsQuery())
        $Ctx.Load($ListItems)
        $Ctx.ExecuteQuery()
     
        #Array to Hold Result - PSObjects
        $ListItemCollection = @()
       
        #Fetch each list item value to export to excel
        ForEach($Item in $ListItems)
        {
            $ExportItem = New-Object PSObject
            ForEach($Field in $FieldColl)
            {
                $ExportItem | Add-Member -MemberType NoteProperty -name $Field.InternalName -value $Item[$Field.InternalName]  
            } 
            #Add the object with property to an Array
            $ListItemCollection += $ExportItem
        }
        #Export data to CSV File
        $ListItemCollection | Export-Csv -Path $CSVPath -NoTypeInformation -Force
     
        Write-host "User Information List has been Exported to CSV!'" -f Green
    }
    Catch {
        write-host -f Red "Error:" $_.Exception.Message
    

    Then use PowerShell remove the user you want to remove.

    #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://tenant-admin.sharepoint.com/"
    $SiteURL="https://tenant.sharepoint.com/"
    $UserID="username.com#EXT#@crescent.onmicrosoft.com"
     
    #Call the function to delete the user from user information list
    Delete-SPOUser -AdminCenterURL $AdminCenterURL -SiteURL $SiteURL -UserID $UserID
    

    For more information, please refer to:

    https://www.sharepointdiary.com/2018/08/sharepoint-online-export-user-information-list-using-powershell.html

    https://www.sharepointdiary.com/2018/02/sharepoint-online-delete-user-from-user-information-list.html#:~:text=In%20SharePoint%20Online%2C%20the%20user,address%2C%20and%20other%20profile%20information.

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

    Hope this helps.


    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.


  2. Esterl, Karen Lynn 0 Reputation points
    2024-03-18T15:09:14.81+00:00

    We have a similar issue, and I'm fairly confident that the reason that the User Information List is reporting such a high count is that it's counting the members of any mail-enabled security group (aka distribution list) that are in the User Information List. So, for example, Group1-AllEmory appears as only one item in the view of the User Information List, but it contains over 20K members. Thus when I look at the list settings those 20K members are included in the count, thereby seriously inflating the total!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.