In the request body, supply the values for relevant fields that should be updated. Existing properties that aren't included in the request body maintains their previous values or be recalculated based on changes to other property values. For best performance you shouldn't include existing values that haven't changed.
Property
Type
Description
isLocked
Boolean
Indicates if the thread is locked. Set to true to disallow posting.
Response
If successful, this method returns a 200 OK response code and an empty object 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 ConversationThread
{
IsLocked = true,
};
var result = await graphClient.Groups["{group-id}"].Threads["{conversationThread-id}"].PatchAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc groups threads patch --group-id {group-id} --conversation-thread-id {conversationThread-id} --body '{\
"isLocked": true\
}\
'
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ConversationThread();
$requestBody->setIsLocked(true);
$result = $graphServiceClient->groups()->byGroupId('group-id')->threads()->byConversationThreadId('conversationThread-id')->patch($requestBody)->wait();
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(request_adapter)
request_body = ConversationThread(
is_locked = True,
)
result = await graph_client.groups.by_group_id('group-id').threads.by_thread_id('conversationThread-id').patch(body = request_body)