1

I am trying to access Person or Group column using REST API, but it is giving an error "BAD URL". Can someone please help me with this ?

_api/web/lists/getByTitle('Plan')/getitems?$select=WRNo

Here WRNo is a person or group column name.

3 Answers 3

1

You can get it per item:

_api/web/lists/getByTitle('Plan')/items(<id of item>)?$select=WRNo/Title&$expand=WRNo/Id

or all:

_api/web/lists/getByTitle('Plan')/items?$select=WRNo/Title&$expand=WRNo/Id
1

You need to expand People or Group column to get the details associated with that column.

Get all items

 https://site-url/_api/web/Lists/GetByTitle('listname')/Items?$expand=WRNo&$select= WRNo/Title

Get specific item

https://site-url/_api/web/Lists/GetByTitle('listname')/Items(ItemID)?$expand=WRNo&$select= WRNo/Title

Where WRNo is the Person column Internal name.

Below are some available values other than Title to get from Person column with REST :

Title

Name

EMail

MobilePhone

SipAddress

Department

JobTitle

FirstName

LastName

WorkPhone

UserName

Office

ID

Modified

Created

ImnName

NameWithPicture

NameWithPictureAndDetails

ContentTypeDisp

I hope this helps.

0

you should use it like this

http://yourSite/_api/web/lists/getByTitle('Pages')/items?$select=Title,Id,Author/Title&$expand=Author

use expand to select people ou lookup fields

an example here

1
  • OP is clearly specify field WRNO as person or group. So you should reply in that manner Commented Nov 27, 2019 at 5:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.