// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new Message
{
Subject = "subject-value",
Body = new ItemBody
{
ContentType = BodyType.Text,
Content = "content-value",
},
InferenceClassification = InferenceClassificationType.Other,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Me.Messages["{message-id}"].PatchAsync(requestBody);
// 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.NewMessage()
subject := "subject-value"
requestBody.SetSubject(&subject)
body := graphmodels.NewItemBody()
contentType := graphmodels.TEXT_BODYTYPE
body.SetContentType(&contentType)
content := "content-value"
body.SetContent(&content)
requestBody.SetBody(body)
inferenceClassification := graphmodels.OTHER_INFERENCECLASSIFICATIONTYPE
requestBody.SetInferenceClassification(&inferenceClassification)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
messages, err := graphClient.Me().Messages().ByMessageId("message-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
Message message = new Message();
message.setSubject("subject-value");
ItemBody body = new ItemBody();
body.setContentType(BodyType.Text);
body.setContent("content-value");
message.setBody(body);
message.setInferenceClassification(InferenceClassificationType.Other);
Message result = graphClient.me().messages().byMessageId("{message-id}").patch(message);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\Message;
use Microsoft\Graph\Generated\Models\ItemBody;
use Microsoft\Graph\Generated\Models\BodyType;
use Microsoft\Graph\Generated\Models\InferenceClassificationType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Message();
$requestBody->setSubject('subject-value');
$body = new ItemBody();
$body->setContentType(new BodyType('text'));
$body->setContent('content-value');
$requestBody->setBody($body);
$requestBody->setInferenceClassification(new InferenceClassificationType('other'));
$result = $graphServiceClient->me()->messages()->byMessageId('message-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.message import Message
from msgraph.generated.models.item_body import ItemBody
from msgraph.generated.models.body_type import BodyType
from msgraph.generated.models.inference_classification_type import InferenceClassificationType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Message(
subject = "subject-value",
body = ItemBody(
content_type = BodyType.Text,
content = "content-value",
),
inference_classification = InferenceClassificationType.Other,
)
result = await graph_client.me.messages.by_message_id('message-id').patch(request_body)