0

Im trying to retrieve some information from a Sharepoint list that contains our Company news. I have looked through our columns that exists and realized that the image is located at a column named PublishingRollupImage.

My call to microsoft looks like this: https://graph.microsoft.com/v1.0/sites/{tenant id}/lists/posts/items?$expand=fields($select=Title,body,DepartmentCompany,PublishingRollupImage)

BUT - if i make this call, the response will be:

{
    "error": {
        "code": "-1, Microsoft.SharePoint.Client.ClientServiceException",
        "message": "Cannot serialize data for type Microsoft.SharePoint.Publishing.Fields.ImageFieldValue.",
        "innerError": {
            "request-id": "f885269e-da21-45a0-b3e4-e304f4e01edb",
            "date": "2018-12-10T12:12:25"
        }
    }
}

This is of corse due to that i'm getting the whole image sent by adding this. But i read that i could use .ImageUrl to cast it to a link instead, but i'm not sure if this could be done in a call like this.

Has anyone any pointers to give?

Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63
Giovanni Palusa
  • 1,197
  • 1
  • 16
  • 36
  • Hi Giovanni, are you using an out of the box template for your company news or is this a custom site? Looks like this might be a classic publishing site? In particular is the posts list a custom list you've created or one of the out of the box types? That will help me figure out if this is a bug or a feature request we need to address. Thanks! – Jeremy Kelley - Microsoft Dec 14 '18 at 18:28

1 Answers1

0

The Object Model(CSOM/JSOM) way return object list but not JSON, so it does not need to serialize. Graph way return JSON, it need serialize operation.

No available workaround for this now, so you may not use the field by Graph now. You could submit one feature request on the UserVoice.

Seiya Su
  • 1,836
  • 1
  • 7
  • 10