Sharepoint BannerUrl field not update

Mateus Ferreira 5 Reputation points
2024-07-05T13:51:29.99+00:00

I need to update the cover image of Events (ListItem Event) on SharePoint using the Graph API. I'm using APP ONLY ACCESS mode for authentication with this endpoint:

https://login.microsoftonline.com/{{tenant_id}}/oauth2/v2.0/token

My Application has the "Sites.Manage.All" scope.

When I call the endpoint to update or create an event, if I include the "BannerUrl" field, I always get the following error:

   {
    "error": {
        "code": "generalException",
        "message": "General exception while processing",
        "innerError": {
            "date": "2024-06-28T11:50:07",
            "request-id": "a7f573a1-f7e9-49b8-9e0c-160a1d68cbf7",
            "client-request-id": "a7f573a1-f7e9-49b8-9e0c-160a1d68cbf7"
        }
    }
}

My request:

POST /v1.0/sites/{{site_id}}/lists/{{list_id}}/items HTTP/1.1
Host: graph.microsoft.com
Content-Type: application/json
Authorization: Bearer
Content-Length: 507
{
	"fields": {
		"Title": "Example",
		"EventDate": "2024-07-15 09:00:00+00:00",
		"EndDate": "2024-07-15 17:00:00+00:00",
		"Category": "Example",
		"Description": "Hello world",
		"Location": "Avenida Paulista, 1000 - Bela Vista, São Paulo, SP 01313-000, Brazil",
		"fAllDayEvent": true,
		"BannerUrl": "https://image.jpg"
	}
}

I believe there are two fields, BannerImageUrl, and BannerUrl. BannerUrl seems to be the correct one, but I always get an error when I try to define this field!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,266 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,159 questions
{count} votes