Search code examples
sharepointboomi

How to read List Column value from SharePoint using Graph API?


Data are stored in a column in this below format:

Sample data

By this URL I can view the data sharepoint. https://URL.sharepoint.com/sites/Sitename/Lists/ListName/AllItems.aspx

Now I want to read the case ref no and create new case ref no. But not able to so. https://graph.microsoft.com/v1.0/sites/url.sharepoint.com:/sites/sitename:/lists/listname?expand=columns,items(expand=fields)

By using the URL I am able to see Desired Column name. Here is the output:

{
  "columnGroup": "Custom Columns",
  "description": "",
  "displayName": "Case Ref",
  "enforceUniqueValues": false,
  "hidden": false,
  "id": "82642ec8-ef9b-478f-acf9-31f7d45fbc31",
  "indexed": false,
  "name": "LinkTitle",
  "readOnly": true,
  "required": false
},

But I am not able to view column data (ie: case ref)


Solution

  • Did you change the default column "LinkTitle" display name to "Case Ref"?

    I suggest you create a new column "Case Ref" and copy data to this column, rather than modify the default list columns.

    Then you can use the Graph API below to get items.

    https://graph.microsoft.com/v1.0/sites/xxx.sharepoint.com:/sites/team:/lists/TestGraph/items?expand=fields(select=id,Title,Case_x0020_Ref)