Hi, thank you for the reply. My ultimate goal here is to get the thumbnailURL for the news article. It would be great if I could get it with this first 'pages' Graph call, but it does not appear even with the * in expand fields.
This is one item from this call;
https://graph.microsoft.com/v1.0/sites/company.sharepoint.com,8b916ccb-d28a-4cb8-8d3a-366b2884a2f9,dd15c2e1-9d25-4f5e-8b94-8e06818ca2dd/lists/2ce55294-ef84-45f7-a188-9a63492164f7/items/?$filter=fields/FirstPublishedDate gt '2025-01-01'&$expand=fields($select=*)
response;
{
"@odata.etag": "\"43de8128-7061-4fa6-8dde-d9e3e74cd7a7,119\"",
"createdDateTime": "2025-02-13T14:47:07Z",
"eTag": "\"43de8128-7061-4fa6-8dde-d9e3e74cd7a7,119\"",
"id": "29",
"lastModifiedDateTime": "2025-02-13T15:26:34Z",
"webUrl": "https://companygroup.sharepoint.com/functions/AnnualPeopleAwards/SitePages/We%27re-at-the-halfway-mark.aspx",
"createdBy": {
"user": {
"email": "user.user@company-ltd.com",
"id": "73bdf718-5cbf-4c1a-bb4c-6ea656ebd0a2",
"displayName": "user user"
}
},
"lastModifiedBy": {
"user": {
"email": "user.user@company-ltd.com",
"id": "f983ea15-7f00-4ac6-9593-b6d3802c435a",
"displayName": "user user"
}
},
"parentReference": {
"id": "0338b3e0-1f05-4e67-ab12-429d5c74bdd0",
"siteId": "companygroup.sharepoint.com,8b916ccb-d28a-4cb8-8d3a-366b2884a2f9,dd15c2e1-9d25-4f5e-8b94-8e06818ca2dd"
},
"contentType": {
"id": "0x0101009D1CB255DA76424F860D91F20E6C41180053E73BB56D7B3C4C9CD782724B5152F7",
"name": "Site Page"
},
"fields@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites('companygroup.sharepoint.com%2C8b916ccb-d28a-4cb8-8d3a-366b2884a2f9%2Cdd15c2e1-9d25-4f5e-8b94-8e06818ca2dd')/lists('2ce55294-ef84-45f7-a188-9a63492164f7')/items('29')/fields(*)/$entity",
"fields": {
"@odata.etag": "\"43de8128-7061-4fa6-8dde-d9e3e74cd7a7,119\"",
"FileLeafRef": "We're-at-the-halfway-mark.aspx",
"Title": "It's all to play for...",
"Description": "The Annual People Awards take place in May and are a celebration of our fantastic company people. As part of our Kudos recognition framework, the celebration process starts with your nominations. This year, you have the whole month of February to put fo…",
"_PublishStartDate": "2025-02-13T14:47:07Z",
"Hero_x0020_Story": true,
"Hero_x0020_Headline": "Headline",
"LinkTitle": "It's all to play for...",
"id": "29",
"ContentType": "Site Page",
"Created": "2025-02-13T14:47:07Z",
"AuthorLookupId": "2347",
"Modified": "2025-02-13T15:26:34Z",
"EditorLookupId": "2780",
"_CheckinComment": "",
"LinkFilenameNoMenu": "We're-at-the-halfway-mark.aspx",
"LinkFilename": "We're-at-the-halfway-mark.aspx",
"DocIcon": "aspx",
"FileSizeDisplay": "21837",
"ItemChildCount": "0",
"FolderChildCount": "0",
"_ComplianceFlags": "",
"_ComplianceTag": "",
"_ComplianceTagWrittenTime": "",
"_ComplianceTagUserId": "",
"_CommentCount": "",
"_LikeCount": "",
"_DisplayName": "",
"Edit": "0",
"_UIVersionString": "2.0",
"ParentVersionStringLookupId": "29",
"ParentLeafNameLookupId": "29"
}
}
]
}
Unfortunately there is no thumbnailURL, and no GUID id. Only the sharepoint list id '695'.
The only unique field I can see to make the second Graph call, is the URL or filename
So my second call looks like this;
https://graph.microsoft.com/beta/sites/company.sharepoint.com,8b916ccb-d28a-4cb8-8d3a-366b2884a2f9,dd15c2e1-9d25-4f5e-8b94-8e06818ca2dd/pages/microsoft.graph.sitePage?filter=webUrl eq 'https://companygroup.sharepoint.com/functions/AnnualPeopleAwards/SitePages/We%27re-at-the-halfway-mark.aspx'
as expected, this gives an error;
"message": "Invalid filter clause: Syntax error at position 91 in 'webUrl eq 'https://companygroup.sharepoint.com/functions/AnnualPeopleAwards/SitePages/We're-at-the-halfway-mark.aspx''.",
So I tried escaping the apostrophe by replacing it with double apostrophes in both formats ('') and (%27%27). Both responses have no value;
e.g.
https://graph.microsoft.com/beta/sites/companygroup.sharepoint.com,8b916ccb-d28a-4cb8-8d3a-366b2884a2f9,dd15c2e1-9d25-4f5e-8b94-8e06818ca2dd/pages/microsoft.graph.sitePage?filter=webUrl eq 'https://company.sharepoint.com/functions/AnnualPeopleAwards/SitePages/We%27%27re-at-the-halfway-mark.aspx'
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#sites('company.sharepoint.com%2C8b916ccb-d28a-4cb8-8d3a-366b2884a2f9%2Cdd15c2e1-9d25-4f5e-8b94-8e06818ca2dd')/pages/microsoft.graph.sitePage",
"@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET sites('<key>')/pages/microsoft.graph.sitePage?$select=promotionKind,reactions",
"value": []
}
I have also just tried escaping with a \
i.e. \%27 and \'
Both give' Bad Request'