SharePoint Person field in Rest API

g h 716 Reputation points
2020-10-21T09:41:10.02+00:00

I have one sharepoint list which is using Person Field, which data source is a user in SharePoint

If I use OData url with "FieldValuesAsText" I can see data like username. However without FieldValuesAsText I can only get a int value seems it's the user id.

Since, my list is very big and want to retrieve data in minimum number of calls. looking for some kind of approach or URL which will help me achieve the same in Rest API

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,557 questions
0 comments No comments
{count} vote

Accepted answer
  1. Jerryzy 10,556 Reputation points
    2020-10-22T01:48:17.457+00:00

    Hi @g h ,

    Try to expand Person field to get username like this:

    .../_api/web/lists/getbytitle('ListName')/items?$select=MyUserField/Name&$expand=MyUserField


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    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.

    3 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful