I'm trying to set a SharePoint site's Title through the SharePoint REST API using C# code.
When I get the site's web data using:
GET http://mycompany.sharepoint.com/sites/site-url/_api/web/
I get a response something like this:
{
"d": {
"__metadata": {
"id": "https://mycompany.sharepoint.com/sites/site-url/_api/Web",
"uri": "https://mycompany.sharepoint.com/sites/site-url/_api/Web",
"type": "SP.Web"
},
// .... many more nodes here .....
"Title": "my old title to be changed",
// ... more data here
}
}
Now I was hoping to change that SharePoint site's title by using this REST command:
POST http://mycompany.sharepoint.com/sites/site-url/_api/web
with a body of
{
"__metadata": {
"type": "SP.Web"
},
"Title": "My new SharePoint site title here"
}
and headers:
Accept application/json;odata=verbose
Content-Type application/json;odata=verbose
X-HTTP-Method MERGE
If-Match *
The command executed from Postman completes with an HTTP 200 - OK status - yet, when I go retrieve the title again:
GET http://mycompany.sharepoint.com/sites/site-url/_api/web/title
I still get back:
{
"d": {
"Title": "my old title to be changed",
}
}
So it seems nothing really was changed at all ...
How can I change a SharePoint Online site's Title property through a REST API call?


displayName- but that property is read-only - so what do I need to do to set the title to a new value?? Can you point to a blog post or post an answer here? I have a really hard time finding any meaningful samples of how to use the MS Graph with Sharepoint....