L’API de demande de droits de l’objet sous le /privacy nœud est déconseillée et cessera de retourner des données le 30 mars 2025. Utilisez le nouveau chemin d’accès sous /security.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new SubjectRightsRequest
{
OdataType = "#microsoft.graph.subjectRightsRequest",
InternalDueDateTime = DateTimeOffset.Parse("2021-08-30T00:00:00Z"),
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Privacy.SubjectRightsRequests["{subjectRightsRequest-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
"time"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewSubjectRightsRequest()
internalDueDateTime , err := time.Parse(time.RFC3339, "2021-08-30T00:00:00Z")
requestBody.SetInternalDueDateTime(&internalDueDateTime)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
subjectRightsRequests, err := graphClient.Privacy().SubjectRightsRequests().BySubjectRightsRequestId("subjectRightsRequest-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);
SubjectRightsRequest subjectRightsRequest = new SubjectRightsRequest();
subjectRightsRequest.setOdataType("#microsoft.graph.subjectRightsRequest");
OffsetDateTime internalDueDateTime = OffsetDateTime.parse("2021-08-30T00:00:00Z");
subjectRightsRequest.setInternalDueDateTime(internalDueDateTime);
SubjectRightsRequest result = graphClient.privacy().subjectRightsRequests().bySubjectRightsRequestId("{subjectRightsRequest-id}").patch(subjectRightsRequest);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\SubjectRightsRequest;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new SubjectRightsRequest();
$requestBody->setOdataType('#microsoft.graph.subjectRightsRequest');
$requestBody->setInternalDueDateTime(new \DateTime('2021-08-30T00:00:00Z'));
$result = $graphServiceClient->privacy()->subjectRightsRequests()->bySubjectRightsRequestId('subjectRightsRequest-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.subject_rights_request import SubjectRightsRequest
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = SubjectRightsRequest(
odata_type = "#microsoft.graph.subjectRightsRequest",
internal_due_date_time = "2021-08-30T00:00:00Z",
)
result = await graph_client.privacy.subject_rights_requests.by_subject_rights_request_id('subjectRightsRequest-id').patch(request_body)
Remarque : l’objet de réponse affiché ci-après peut être raccourci pour plus de lisibilité.
HTTP/1.1 200 OK
Content-Type: application/json
{
"displayName": "Updated case name for Diego Siciliani",
"description": "This is an updated case",
"internalDueDateTime": "2022-07-20T22:42:28Z"
}