Namespace: microsoft.graph Aktualisieren sie ein Threadobjekt .
Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.
| Weltweiter Service |
US Government L4 |
US Government L5 (DOD) |
China, betrieben von 21Vianet |
| ✅ |
✅ |
✅ |
✅ |
Berechtigungen
Wählen Sie die Berechtigungen aus, die für diese API als am wenigsten privilegiert markiert sind. Verwenden Sie eine höhere Berechtigung oder Berechtigungen nur, wenn Ihre App dies erfordert. Ausführliche Informationen zu delegierten Berechtigungen und Anwendungsberechtigungen finden Sie unter Berechtigungstypen. Weitere Informationen zu diesen Berechtigungen finden Sie in der Berechtigungsreferenz.
| Berechtigungstyp |
Berechtigungen mit den geringsten Berechtigungen |
Berechtigungen mit höheren Berechtigungen |
| Delegiert (Geschäfts-, Schul- oder Unikonto) |
Group-Conversation.ReadWrite.All |
Group.ReadWrite.All |
| Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Nicht unterstützt |
| Application |
Group-Conversation.ReadWrite.All |
Group.ReadWrite.All |
HTTP-Anforderung
PATCH /groups/{id}/threads/{id}
Anforderungstext
Geben Sie im Anforderungstext die Werte für die relevanten Felder an, die aktualisiert werden sollen. Vorhandene Eigenschaften, die nicht im Anforderungstext enthalten sind, behalten ihre vorherigen Werte oder werden basierend auf Änderungen an anderen Eigenschaftswerten neu berechnet. Aus Gründen der Leistung sollten Sie vorhandene Werte, die nicht geändert wurden, nicht angeben.
Antwort
Wenn die Methode erfolgreich verläuft, wird der Antwortcode 204 No Content zurückgegeben.
Beispiel
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
PATCH https://graph.microsoft.com/v1.0/groups/02bd9fd6-8f93-4758-87c3-1fb73740a315/threads/AAQkAGI5MWY5ZmUyLTJiNzYtNDE0ZC04OWEwLWM3M2FjYmM3NzNlZgMkABAAG5c7eC4NYEynIoXsuxXB9RAAG5c7eC4NYEynIoXsuxXB9Q==
Content-type: application/json
{
"originalStartTimeZone": "originalStartTimeZone-value",
"originalEndTimeZone": "originalEndTimeZone-value",
"responseStatus": {
"response": "",
"time": "datetime-value"
},
"iCalUId": "iCalUId-value",
"reminderMinutesBeforeStart": 99,
"isReminderOn": true
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
using Microsoft.Kiota.Abstractions.Serialization;
var requestBody = new ConversationThread
{
AdditionalData = new Dictionary<string, object>
{
{
"originalStartTimeZone" , "originalStartTimeZone-value"
},
{
"originalEndTimeZone" , "originalEndTimeZone-value"
},
{
"responseStatus" , new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"response", new UntypedString("")
},
{
"time", new UntypedString("datetime-value")
},
})
},
{
"iCalUId" , "iCalUId-value"
},
{
"reminderMinutesBeforeStart" , 99
},
{
"isReminderOn" , true
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Groups["{group-id}"].Threads["{conversationThread-id}"].PatchAsync(requestBody);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewConversationThread()
additionalData := map[string]interface{}{
"originalStartTimeZone" : "originalStartTimeZone-value",
"originalEndTimeZone" : "originalEndTimeZone-value",
responseStatus := graph.New()
response := ""
responseStatus.SetResponse(&response)
time := "datetime-value"
responseStatus.SetTime(&time)
requestBody.SetResponseStatus(responseStatus)
"iCalUId" : "iCalUId-value",
"reminderMinutesBeforeStart" : int32(99) ,
isReminderOn := true
requestBody.SetIsReminderOn(&isReminderOn)
}
requestBody.SetAdditionalData(additionalData)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
threads, err := graphClient.Groups().ByGroupId("group-id").Threads().ByConversationThreadId("conversationThread-id").Patch(context.Background(), requestBody, nil)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ConversationThread conversationThread = new ConversationThread();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("originalStartTimeZone", "originalStartTimeZone-value");
additionalData.put("originalEndTimeZone", "originalEndTimeZone-value");
responseStatus = new ();
responseStatus.setResponse("");
responseStatus.setTime("datetime-value");
additionalData.put("responseStatus", responseStatus);
additionalData.put("iCalUId", "iCalUId-value");
additionalData.put("reminderMinutesBeforeStart", 99);
additionalData.put("isReminderOn", true);
conversationThread.setAdditionalData(additionalData);
ConversationThread result = graphClient.groups().byGroupId("{group-id}").threads().byConversationThreadId("{conversationThread-id}").patch(conversationThread);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
const options = {
authProvider,
};
const client = Client.init(options);
const conversationThread = {
originalStartTimeZone: 'originalStartTimeZone-value',
originalEndTimeZone: 'originalEndTimeZone-value',
responseStatus: {
response: '',
time: 'datetime-value'
},
iCalUId: 'iCalUId-value',
reminderMinutesBeforeStart: 99,
isReminderOn: true
};
await client.api('/groups/02bd9fd6-8f93-4758-87c3-1fb73740a315/threads/AAQkAGI5MWY5ZmUyLTJiNzYtNDE0ZC04OWEwLWM3M2FjYmM3NzNlZgMkABAAG5c7eC4NYEynIoXsuxXB9RAAG5c7eC4NYEynIoXsuxXB9Q==')
.update(conversationThread);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\ConversationThread;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ConversationThread();
$additionalData = [
'originalStartTimeZone' => 'originalStartTimeZone-value',
'originalEndTimeZone' => 'originalEndTimeZone-value',
'responseStatus' => [
'response' => '',
'time' => 'datetime-value',
],
'iCalUId' => 'iCalUId-value',
'reminderMinutesBeforeStart' => 99,
'isReminderOn' => true,
];
$requestBody->setAdditionalData($additionalData);
$result = $graphServiceClient->groups()->byGroupId('group-id')->threads()->byConversationThreadId('conversationThread-id')->patch($requestBody)->wait();
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Import-Module Microsoft.Graph.Groups
$params = @{
originalStartTimeZone = "originalStartTimeZone-value"
originalEndTimeZone = "originalEndTimeZone-value"
responseStatus = @{
response = ""
time = "datetime-value"
}
iCalUId = "iCalUId-value"
reminderMinutesBeforeStart =
isReminderOn = $true
}
Update-MgGroupThread -GroupId $groupId -ConversationThreadId $conversationThreadId -BodyParameter $params
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.conversation_thread import ConversationThread
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ConversationThread(
additional_data = {
"original_start_time_zone" : "originalStartTimeZone-value",
"original_end_time_zone" : "originalEndTimeZone-value",
"response_status" : {
"response" : "",
"time" : "datetime-value",
},
"i_cal_u_id" : "iCalUId-value",
"reminder_minutes_before_start" : 99,
"is_reminder_on" : True,
}
)
result = await graph_client.groups.by_group_id('group-id').threads.by_conversation_thread_id('conversationThread-id').patch(request_body)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Antwort
Das folgende Beispiel zeigt die Antwort.
HTTP/1.1 204 No Content