杨有为
杨有为

Reputation: 11

How to get columns(fields) in sharepoint using microsoft graph api

When I call Microsoft graph API to return some of the properties,But I need the properties of the lack of some。

https://graph.microsoft.com/beta/sharepoint/sites/{site-id}/lists/{list-id}/fields

If the return type is the Choice I need to know the Choice list but I did not get because call right

Upvotes: 1

Views: 2218

Answers (2)

Tristan Sébillet
Tristan Sébillet

Reputation: 357

You can get this information now by using the following endpoint :

https://graph.microsoft.com/v1.0/sites/{site-Id}/lists/{list-Id}/columns

source : https://learn.microsoft.com/en-us/graph/api/resources/list?view=graph-rest-1.0

Upvotes: 2

Ryan Gregg
Ryan Gregg

Reputation: 2035

This capability is not supported in the Microsoft Graph API at this time. In the mean time you can use the SharePoint REST API to retrieve the field information, including the choices available in a choice field.

There's more details available about how to use the SharePoint REST API to retrieve fields on MSDN here: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx

To call the SharePoint REST API, you'll need to know the URL for the SharePoint site/list, and get an access token for that SharePoint tenant as well.

Upvotes: 1

Related Questions