User Information List is a hidden list that stores information about users who have accessed the site collection.
This list is used internally by SharePoint for various purposes, such as the people picker, workflows, and other features that require user information.
The LookupId in a PersonOrGroup field refers to the ListItem in this list.
When a user signs into a SharePoint site collection for the first time, a ListItem is created in a User Information List.
Accessing the User Information List:
- Open your web browser and navigate to your SharePoint site.
- In the URL, append /_catalogs/users/detail.aspx to the site URL.
- For example https://{yourTenant}.sharepoint.com/{yourSiteCollection}/_catalogs/users/detail.aspx
Viewing User Information:
- The user information list will display user accounts that have accessed the site.
- The list stores the information about a user with some metadata configured/added to the user as part of Active Directory (AD) like user Picture, DisplayName, and Login Name (domain\user-id) etc.
Permissions:
Users with site collection administrators only can access this list, modifying this list directly could lead to unexpected behavior in SharePoint.
Call the list with Graph
All users and groups that have access to a SharePoint site in a site collection are held in the User Information List.
Since the User Information List is a generic SharePoint list, you can query the list via Graph API.
You need the Site ID and List ID of the SharePoint list you want to access. These IDs can be obtained from the SharePoint site URL or by querying the site’s lists using the Graph API.
https://graph.microsoft.com/v1.0/sites/{siteId}/lists/{ListId}/items?$expand=Fields
Site ID:
Go to your SharePoint site and use the /_api/site/id endpoint with the appropriate site URL:
https://yourtenant.sharepoint.com/sites/yoursite/_api/site/id
You’ll get the site id in the response
List ID:
Go to https://developer.microsoft.com/en-us/graph/graph-explorer and verify that you’re logged in.
The only way to get the list without knowing the id is by using the property displayName of the list.
https://graph.microsoft.com/v1.0/sites/{Site-ID}/lists?$filter=displayName eq ‘User Information List’
Replace {siteId}
with the ID of your SharePoint site and {listId}
with the ID of the list of the User Information List.
You can also use query parameters to filter, sort, or limit the results. For example, to select specific fields and filter by a certain value:
https://graph.microsoft.com/v1.0/sites/{siteId}/lists/{listId}/items
you’ll get a response like this for all users and groups in the list
{
"@odata.etag": "\"31ee9080-54dc-41ff-8ce8-454b8465e047,3\"",
"id": "9",
"fields": {
"@odata.etag": "\"31ee9080-54dc-41ff-8ce8-454b8465e047,3\"",
"Title": "Naveen Kumar",
"Name": "i:0#.f|membership|naveen@v72k0.onmicrosoft.com",
"EMail": "Naveen@v72k0.onmicrosoft.com",
"SipAddress": "naveen@v72k0.onmicrosoft.com",
"IsSiteAdmin": false,
"Deleted": false,
"UserInfoHidden": false,
"Picture": {
"Description": "https://v72k0-my.sharepoint.com:443/User%20Photos/Profile%20Pictures/afb5adcd-7513-44d1-9cd3-0b0f5dc7e4c0_MThumb.jpg",
"Url": "https://v72k0-my.sharepoint.com:443/User%20Photos/Profile%20Pictures/afb5adcd-7513-44d1-9cd3-0b0f5dc7e4c0_MThumb.jpg"
},
"FirstName": "Naveen",
"LastName": "Kumar",
"LinkTitle": "Naveen Kumar",
"WorkPhone": "918526941584",
"UserName": "Naveen@v72k0.onmicrosoft.com",
"Modified": "2023-08-01T06:31:54Z",
"Created": "2023-08-01T06:25:46Z",
}
}
The Graph API endpoint structure and parameters might have evolved since my last update, so be sure to refer to the official Microsoft Graph API documentation for the latest details.
Overall, the User Information List plays a critical role in maintaining user identity, personalization, collaboration, and security within a SharePoint site collection. While it might not always be directly exposed to users or administrators, its presence and functionality significantly contribute to a seamless and efficient SharePoint experience.
No Comment! Be the first one.