When used with application permissions, this API is metered. It supports the model=A payment model. For details, see Payment models. If you don't specify a payment model in your query, the default evaluation mode will be used.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
Chat.ReadWrite
Delegated (personal Microsoft account)
Not supported.
Application
Not supported.
HTTP request
PATCH /chats/{chat-id}
Request headers
Name
Description
Authorization
Bearer {token}. Required.
Content-Type
application/json. Required.
Request body
In the request body, supply a JSON representation of the chat object.
The following table shows the properties that can be used with this action.
Property
Type
Description
topic
String
The title of the chat. This can only be set for a chat with a chatType value of group. Maximum length is 250 characters. Use of ':' is not allowed.
Response
If successful, this method returns a 200 OK response code and the updated chat resource in the response body.
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new Chat
{
Topic = "Group chat title update",
};
var result = await graphClient.Chats["{chat-id}"].PatchAsync(requestBody);
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Chat();
$requestBody->setTopic('Group chat title update');
$result = $graphServiceClient->chats()->byChatId('chat-id')->patch($requestBody)->wait();
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(request_adapter)
request_body = Chat(
topic = "Group chat title update",
)
result = await graph_client.chats.by_chat_id('chat-id').patch(body = request_body)