Bharath Balan
Bharath Balan

Reputation: 21

How to get Columns(Fields) in a List in Sharepoint using Microsoft Graph API

I need to get the columns(Fields) of a List in a Sharepoint Site so that I can present the appropriate fields to the user for Create and Update Actions on ListItems. It's mentioned in the Documentation that a List will have a property called "fields" which will contain these columns. However, these are not returned by the API. Am I missing something here?

Upvotes: 1

Views: 2765

Answers (2)

bresleveloper
bresleveloper

Reputation: 6066

/items?expand=fields(select%3DTitle,FullName)

Upvotes: 1

Bharath Balan
Bharath Balan

Reputation: 21

You should attach the query parameter ?select=fields to get the field list.

Eg. GET https://graph.microsoft.com/beta/sharepoint/sites/{site-id}/lists/{list-id}?select=fields

Upvotes: 0

Related Questions