PATCH https://graph.microsoft.com/beta/search/qnas/733b26d5-af76-4eea-ac69-1a0ce8716897
Content-Type: application/json
{
"description": "The dates that Contoso offices will be closed to observe holidays. These dates may differ from the actual date of the holiday in cases where the holiday falls on a weekend."
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models.Search;
var requestBody = new Qna
{
Description = "The dates that Contoso offices will be closed to observe holidays. These dates may differ from the actual date of the holiday in cases where the holiday falls on a weekend.",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Search.Qnas["{qna-id}"].PatchAsync(requestBody);
mgc-beta search qnas patch --qna-id {qna-id} --body '{\
"description": "The dates that Contoso offices will be closed to observe holidays. These dates may differ from the actual date of the holiday in cases where the holiday falls on a weekend."\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodelssearch "github.com/microsoftgraph/msgraph-beta-sdk-go/models/search"
//other-imports
)
requestBody := graphmodelssearch.NewQna()
description := "The dates that Contoso offices will be closed to observe holidays. These dates may differ from the actual date of the holiday in cases where the holiday falls on a weekend."
requestBody.SetDescription(&description)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
qnas, err := graphClient.Search().Qnas().ByQnaId("qna-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);
com.microsoft.graph.beta.models.search.Qna qna = new com.microsoft.graph.beta.models.search.Qna();
qna.setDescription("The dates that Contoso offices will be closed to observe holidays. These dates may differ from the actual date of the holiday in cases where the holiday falls on a weekend.");
com.microsoft.graph.models.search.Qna result = graphClient.search().qnas().byQnaId("{qna-id}").patch(qna);
const options = {
authProvider,
};
const client = Client.init(options);
const qna = {
description: 'The dates that Contoso offices will be closed to observe holidays. These dates may differ from the actual date of the holiday in cases where the holiday falls on a weekend.'
};
await client.api('/search/qnas/733b26d5-af76-4eea-ac69-1a0ce8716897')
.version('beta')
.update(qna);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\Search\Qna;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Qna();
$requestBody->setDescription('The dates that Contoso offices will be closed to observe holidays. These dates may differ from the actual date of the holiday in cases where the holiday falls on a weekend.');
$result = $graphServiceClient->search()->qnas()->byQnaId('qna-id')->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Search
$params = @{
description = "The dates that Contoso offices will be closed to observe holidays. These dates may differ from the actual date of the holiday in cases where the holiday falls on a weekend."
}
Update-MgBetaSearchQna -QnaId $qnaId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.search.qna import Qna
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Qna(
description = "The dates that Contoso offices will be closed to observe holidays. These dates may differ from the actual date of the holiday in cases where the holiday falls on a weekend.",
)
result = await graph_client.search.qnas.by_qna_id('qna-id').patch(request_body)