What does Web.SiteUsers (CSOM) include exactly?

2023-08-17T05:47:06.4766667+00:00

Recently I come across an issue that Web.SiteUsers listed the users those who are not present in the SiteUserInformationList of specific site collection (/_catalogs/users/simple.aspx). I am bit confused about this one. Can anyone help me to figure out what this CSOM API include exactly? Thanks in advance.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,230 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,550 questions
SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
654 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
3,043 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,426 Reputation points Microsoft External Staff
    2023-08-17T06:52:29.0433333+00:00

    Hi @unknown_25,

    As far as I know, Web.SiteUsers doesn't get all the users from User Information List, but get most of the list.

    SiteUsers includes users who have a relationship with the site (have access or used to have access to this site/item, or assigned with an item .etc). Once it establishes the relationship, it will be resolved as a user entity in the collection.

    In the past, it doesn't include users who have access due to group membership but haven't used that access yet. From SP2013, It has been changed a little bit, SiteUsers will contain the user as soon as you give them permission to site regardless of they logon this site or not. If a user have access to the site but haven't been logged in the site or ensured. The user will not exist in User Information List but SiteUsers will contain the user.


    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.


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.