Share via

What is the MS Graph API equivalent to retrieve expanded user information from a SharePoint list item?

Ivan Tioh 136 Reputation points
2023-04-18T03:58:19.4566667+00:00

I used to use the following REST API to retrieve the SharePoint list item's user's title, username and email:

https://xxx.sharepoint.com/sites/xxx/_api/web/lists(guid'xxx')/items?$select=ID,UserColumn1/EMail,UserColumn1/UserName,UserColumn1/Title&$expand=UserColumn1

I've attempted to use the following Graph API but can only get the Title:

https://graph.microsoft.com/v1.0/sites/xxx,xxx/lists/xxx/items/xxx?expand=fields(select=Id,Title,UserColumn1/EMail,UserColumn1/UserName,UserColumn1/Title)

What would be the actual equivalent in MS Graph API to get the same information? Or is this limitation of Graph API which does not support so?

Thank you!

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} vote

Answer accepted by question author
  1. RaytheonXie_MSFT 40,496 Reputation points Microsoft External Staff
    2023-04-18T07:25:13.7766667+00:00

    Hi @Ivan Tioh

    If UserColumn1 is a multi-valued user field, then the following query:

    https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items?$expand=fields($select=UserColumn1)
    
    

    This API returns email and id properties along with displayName property for user field value. While for single-valued user field only id (available via {userfield}LookupId property) and displayName properties could be requested via items endpoint, for example:

    https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items?$expand=fields($select=UserColumn1,Usercolumn1LookupId)
    
    

    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.


0 additional answers

Sort by: Most helpful

Your answer

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