Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 684 Bytes

File metadata and controls

22 lines (15 loc) · 684 Bytes
description Automatically generated file. DO NOT MODIFY
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\ItemRetentionLabel;
use Microsoft\Graph\Beta\Generated\Models\RetentionLabelSettings;


$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);

$requestBody = new ItemRetentionLabel();
$retentionSettings = new RetentionLabelSettings();
$retentionSettings->setIsRecordLocked(true);
$requestBody->setRetentionSettings($retentionSettings);

$result = $graphServiceClient->drives()->byDriveId('drive-id')->items()->byDriveItemId('driveItem-id')->retentionLabel()->patch($requestBody)->wait();