Используя метаданные, существующие в уже помеченном фрагменте информации, разрешите метаданные в определенную метку конфиденциальности. Входные данные contentInfo разрешаются в informationProtectionContentLabel.
Выберите разрешение или разрешения, помеченные как наименее привилегированные для этого API. Используйте более привилегированное разрешение или разрешения только в том случае, если это требуется приложению. Дополнительные сведения о делегированных разрешениях и разрешениях приложений см. в разделе Типы разрешений. Дополнительные сведения об этих разрешениях см. в справочнике по разрешениям.
В тексте запроса предоставьте JSON-объект с указанными ниже параметрами.
Ниже приведен пример вызова этого API.
Ниже показан пример запроса.
POST https://graph.microsoft.com/beta/informationProtection/policy/labels/extractLabel
Content-type: application/json
User-agent: ContosoLOBApp/1.0
{
"contentInfo": {
"@odata.type": "#microsoft.graph.contentInfo",
"format@odata.type": "#microsoft.graph.contentFormat",
"format": "default",
"identifier": null,
"state@odata.type": "#microsoft.graph.contentState",
"state": "rest",
"metadata@odata.type": "#Collection(microsoft.graph.keyValuePair)",
"metadata": [
{
"@odata.type": "#microsoft.graph.keyValuePair",
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Enabled",
"value": "True"
},
{
"@odata.type": "#microsoft.graph.keyValuePair",
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Method",
"value": "Standard"
},
{
"@odata.type": "#microsoft.graph.keyValuePair",
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SetDate",
"value": "1/1/0001 12:00:00 AM"
},
{
"@odata.type": "#microsoft.graph.keyValuePair",
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SiteId",
"value": "cfa4cf1d-a337-4481-aa99-19d8f3d63f7c"
},
{
"@odata.type": "#microsoft.graph.keyValuePair",
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Name",
"value": "Top Secret"
},
{
"@odata.type": "#microsoft.graph.keyValuePair",
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ContentBits",
"value": "0"
},
{
"@odata.type": "#microsoft.graph.keyValuePair",
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ActionId",
"value": "00000000-0000-0000-0000-000000000000"
}
]
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.InformationProtection.Policy.Labels.ExtractLabel;
using Microsoft.Graph.Beta.Models;
var requestBody = new ExtractLabelPostRequestBody
{
ContentInfo = new ContentInfo
{
OdataType = "#microsoft.graph.contentInfo",
Format = ContentFormat.Default,
Identifier = null,
State = ContentState.Rest,
Metadata = new List<KeyValuePair>
{
new KeyValuePair
{
OdataType = "#microsoft.graph.keyValuePair",
Name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Enabled",
Value = "True",
},
new KeyValuePair
{
OdataType = "#microsoft.graph.keyValuePair",
Name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Method",
Value = "Standard",
},
new KeyValuePair
{
OdataType = "#microsoft.graph.keyValuePair",
Name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SetDate",
Value = "1/1/0001 12:00:00 AM",
},
new KeyValuePair
{
OdataType = "#microsoft.graph.keyValuePair",
Name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SiteId",
Value = "cfa4cf1d-a337-4481-aa99-19d8f3d63f7c",
},
new KeyValuePair
{
OdataType = "#microsoft.graph.keyValuePair",
Name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Name",
Value = "Top Secret",
},
new KeyValuePair
{
OdataType = "#microsoft.graph.keyValuePair",
Name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ContentBits",
Value = "0",
},
new KeyValuePair
{
OdataType = "#microsoft.graph.keyValuePair",
Name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ActionId",
Value = "00000000-0000-0000-0000-000000000000",
},
},
AdditionalData = new Dictionary<string, object>
{
{
"format@odata.type" , "#microsoft.graph.contentFormat"
},
{
"state@odata.type" , "#microsoft.graph.contentState"
},
{
"metadata@odata.type" , "#Collection(microsoft.graph.keyValuePair)"
},
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.InformationProtection.Policy.Labels.ExtractLabel.PostAsync(requestBody, (requestConfiguration) =>
{
requestConfiguration.Headers.Add("User-Agent", "ContosoLOBApp/1.0");
});
mgc-beta information-protection policy labels extract-label post --body '{\
"contentInfo": {\
"@odata.type": "#microsoft.graph.contentInfo",\
"format@odata.type": "#microsoft.graph.contentFormat",\
"format": "default",\
"identifier": null,\
"state@odata.type": "#microsoft.graph.contentState",\
"state": "rest",\
"metadata@odata.type": "#Collection(microsoft.graph.keyValuePair)",\
"metadata": [\
{\
"@odata.type": "#microsoft.graph.keyValuePair",\
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Enabled",\
"value": "True"\
},\
{\
"@odata.type": "#microsoft.graph.keyValuePair",\
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Method",\
"value": "Standard"\
},\
{\
"@odata.type": "#microsoft.graph.keyValuePair",\
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SetDate",\
"value": "1/1/0001 12:00:00 AM"\
},\
{\
"@odata.type": "#microsoft.graph.keyValuePair",\
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SiteId",\
"value": "cfa4cf1d-a337-4481-aa99-19d8f3d63f7c"\
},\
{\
"@odata.type": "#microsoft.graph.keyValuePair",\
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Name",\
"value": "Top Secret"\
},\
{\
"@odata.type": "#microsoft.graph.keyValuePair",\
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ContentBits",\
"value": "0"\
},\
{\
"@odata.type": "#microsoft.graph.keyValuePair",\
"name": "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ActionId",\
"value": "00000000-0000-0000-0000-000000000000"\
}\
]\
}\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
abstractions "github.com/microsoft/kiota-abstractions-go"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphinformationprotection "github.com/microsoftgraph/msgraph-beta-sdk-go/informationprotection"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
headers := abstractions.NewRequestHeaders()
headers.Add("User-Agent", "ContosoLOBApp/1.0")
configuration := &graphinformationprotection.InformationProtectionPolicyLabelsExtractLabelRequestBuilderPostRequestConfiguration{
Headers: headers,
}
requestBody := graphinformationprotection.NewExtractLabelPostRequestBody()
contentInfo := graphmodels.NewContentInfo()
format := graphmodels.DEFAULT_CONTENTFORMAT
contentInfo.SetFormat(&format)
identifier := null
contentInfo.SetIdentifier(&identifier)
state := graphmodels.REST_CONTENTSTATE
contentInfo.SetState(&state)
keyValuePair := graphmodels.NewKeyValuePair()
name := "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Enabled"
keyValuePair.SetName(&name)
value := "True"
keyValuePair.SetValue(&value)
keyValuePair1 := graphmodels.NewKeyValuePair()
name := "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Method"
keyValuePair1.SetName(&name)
value := "Standard"
keyValuePair1.SetValue(&value)
keyValuePair2 := graphmodels.NewKeyValuePair()
name := "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SetDate"
keyValuePair2.SetName(&name)
value := "1/1/0001 12:00:00 AM"
keyValuePair2.SetValue(&value)
keyValuePair3 := graphmodels.NewKeyValuePair()
name := "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SiteId"
keyValuePair3.SetName(&name)
value := "cfa4cf1d-a337-4481-aa99-19d8f3d63f7c"
keyValuePair3.SetValue(&value)
keyValuePair4 := graphmodels.NewKeyValuePair()
name := "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Name"
keyValuePair4.SetName(&name)
value := "Top Secret"
keyValuePair4.SetValue(&value)
keyValuePair5 := graphmodels.NewKeyValuePair()
name := "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ContentBits"
keyValuePair5.SetName(&name)
value := "0"
keyValuePair5.SetValue(&value)
keyValuePair6 := graphmodels.NewKeyValuePair()
name := "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ActionId"
keyValuePair6.SetName(&name)
value := "00000000-0000-0000-0000-000000000000"
keyValuePair6.SetValue(&value)
metadata := []graphmodels.KeyValuePairable {
keyValuePair,
keyValuePair1,
keyValuePair2,
keyValuePair3,
keyValuePair4,
keyValuePair5,
keyValuePair6,
}
contentInfo.SetMetadata(metadata)
additionalData := map[string]interface{}{
"format@odata.type" : "#microsoft.graph.contentFormat",
"state@odata.type" : "#microsoft.graph.contentState",
"metadata@odata.type" : "#Collection(microsoft.graph.keyValuePair)",
}
contentInfo.SetAdditionalData(additionalData)
requestBody.SetContentInfo(contentInfo)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
extractLabel, err := graphClient.InformationProtection().Policy().Labels().ExtractLabel().Post(context.Background(), requestBody, configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.informationprotection.policy.labels.extractlabel.ExtractLabelPostRequestBody extractLabelPostRequestBody = new com.microsoft.graph.beta.informationprotection.policy.labels.extractlabel.ExtractLabelPostRequestBody();
ContentInfo contentInfo = new ContentInfo();
contentInfo.setOdataType("#microsoft.graph.contentInfo");
contentInfo.setFormat(ContentFormat.Default);
contentInfo.setIdentifier(null);
contentInfo.setState(ContentState.Rest);
LinkedList<KeyValuePair> metadata = new LinkedList<KeyValuePair>();
KeyValuePair keyValuePair = new KeyValuePair();
keyValuePair.setOdataType("#microsoft.graph.keyValuePair");
keyValuePair.setName("MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Enabled");
keyValuePair.setValue("True");
metadata.add(keyValuePair);
KeyValuePair keyValuePair1 = new KeyValuePair();
keyValuePair1.setOdataType("#microsoft.graph.keyValuePair");
keyValuePair1.setName("MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Method");
keyValuePair1.setValue("Standard");
metadata.add(keyValuePair1);
KeyValuePair keyValuePair2 = new KeyValuePair();
keyValuePair2.setOdataType("#microsoft.graph.keyValuePair");
keyValuePair2.setName("MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SetDate");
keyValuePair2.setValue("1/1/0001 12:00:00 AM");
metadata.add(keyValuePair2);
KeyValuePair keyValuePair3 = new KeyValuePair();
keyValuePair3.setOdataType("#microsoft.graph.keyValuePair");
keyValuePair3.setName("MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SiteId");
keyValuePair3.setValue("cfa4cf1d-a337-4481-aa99-19d8f3d63f7c");
metadata.add(keyValuePair3);
KeyValuePair keyValuePair4 = new KeyValuePair();
keyValuePair4.setOdataType("#microsoft.graph.keyValuePair");
keyValuePair4.setName("MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Name");
keyValuePair4.setValue("Top Secret");
metadata.add(keyValuePair4);
KeyValuePair keyValuePair5 = new KeyValuePair();
keyValuePair5.setOdataType("#microsoft.graph.keyValuePair");
keyValuePair5.setName("MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ContentBits");
keyValuePair5.setValue("0");
metadata.add(keyValuePair5);
KeyValuePair keyValuePair6 = new KeyValuePair();
keyValuePair6.setOdataType("#microsoft.graph.keyValuePair");
keyValuePair6.setName("MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ActionId");
keyValuePair6.setValue("00000000-0000-0000-0000-000000000000");
metadata.add(keyValuePair6);
contentInfo.setMetadata(metadata);
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("format@odata.type", "#microsoft.graph.contentFormat");
additionalData.put("state@odata.type", "#microsoft.graph.contentState");
additionalData.put("metadata@odata.type", "#Collection(microsoft.graph.keyValuePair)");
contentInfo.setAdditionalData(additionalData);
extractLabelPostRequestBody.setContentInfo(contentInfo);
var result = graphClient.informationProtection().policy().labels().extractLabel().post(extractLabelPostRequestBody, requestConfiguration -> {
requestConfiguration.headers.add("User-Agent", "ContosoLOBApp/1.0");
});
const options = {
authProvider,
};
const client = Client.init(options);
const informationProtectionContentLabel = {
contentInfo: {
'@odata.type': '#microsoft.graph.contentInfo',
'format@odata.type': '#microsoft.graph.contentFormat',
format: 'default',
identifier: null,
'state@odata.type': '#microsoft.graph.contentState',
state: 'rest',
'metadata@odata.type': '#Collection(microsoft.graph.keyValuePair)',
metadata: [
{
'@odata.type': '#microsoft.graph.keyValuePair',
name: 'MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Enabled',
value: 'True'
},
{
'@odata.type': '#microsoft.graph.keyValuePair',
name: 'MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Method',
value: 'Standard'
},
{
'@odata.type': '#microsoft.graph.keyValuePair',
name: 'MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SetDate',
value: '1/1/0001 12:00:00 AM'
},
{
'@odata.type': '#microsoft.graph.keyValuePair',
name: 'MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SiteId',
value: 'cfa4cf1d-a337-4481-aa99-19d8f3d63f7c'
},
{
'@odata.type': '#microsoft.graph.keyValuePair',
name: 'MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Name',
value: 'Top Secret'
},
{
'@odata.type': '#microsoft.graph.keyValuePair',
name: 'MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ContentBits',
value: '0'
},
{
'@odata.type': '#microsoft.graph.keyValuePair',
name: 'MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ActionId',
value: '00000000-0000-0000-0000-000000000000'
}
]
}
};
await client.api('/informationProtection/policy/labels/extractLabel')
.version('beta')
.post(informationProtectionContentLabel);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\InformationProtection\Policy\Labels\ExtractLabel\ExtractLabelRequestBuilderPostRequestConfiguration;
use Microsoft\Graph\Beta\Generated\InformationProtection\Policy\Labels\ExtractLabel\ExtractLabelPostRequestBody;
use Microsoft\Graph\Beta\Generated\Models\ContentInfo;
use Microsoft\Graph\Beta\Generated\Models\ContentFormat;
use Microsoft\Graph\Beta\Generated\Models\ContentState;
use Microsoft\Graph\Beta\Generated\Models\KeyValuePair;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ExtractLabelPostRequestBody();
$contentInfo = new ContentInfo();
$contentInfo->setOdataType('#microsoft.graph.contentInfo');
$contentInfo->setFormat(new ContentFormat('default'));
$contentInfo->setIdentifier(null);
$contentInfo->setState(new ContentState('rest'));
$metadataKeyValuePair1 = new KeyValuePair();
$metadataKeyValuePair1->setOdataType('#microsoft.graph.keyValuePair');
$metadataKeyValuePair1->setName('MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Enabled');
$metadataKeyValuePair1->setValue('True');
$metadataArray []= $metadataKeyValuePair1;
$metadataKeyValuePair2 = new KeyValuePair();
$metadataKeyValuePair2->setOdataType('#microsoft.graph.keyValuePair');
$metadataKeyValuePair2->setName('MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Method');
$metadataKeyValuePair2->setValue('Standard');
$metadataArray []= $metadataKeyValuePair2;
$metadataKeyValuePair3 = new KeyValuePair();
$metadataKeyValuePair3->setOdataType('#microsoft.graph.keyValuePair');
$metadataKeyValuePair3->setName('MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SetDate');
$metadataKeyValuePair3->setValue('1/1/0001 12:00:00 AM');
$metadataArray []= $metadataKeyValuePair3;
$metadataKeyValuePair4 = new KeyValuePair();
$metadataKeyValuePair4->setOdataType('#microsoft.graph.keyValuePair');
$metadataKeyValuePair4->setName('MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SiteId');
$metadataKeyValuePair4->setValue('cfa4cf1d-a337-4481-aa99-19d8f3d63f7c');
$metadataArray []= $metadataKeyValuePair4;
$metadataKeyValuePair5 = new KeyValuePair();
$metadataKeyValuePair5->setOdataType('#microsoft.graph.keyValuePair');
$metadataKeyValuePair5->setName('MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Name');
$metadataKeyValuePair5->setValue('Top Secret');
$metadataArray []= $metadataKeyValuePair5;
$metadataKeyValuePair6 = new KeyValuePair();
$metadataKeyValuePair6->setOdataType('#microsoft.graph.keyValuePair');
$metadataKeyValuePair6->setName('MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ContentBits');
$metadataKeyValuePair6->setValue('0');
$metadataArray []= $metadataKeyValuePair6;
$metadataKeyValuePair7 = new KeyValuePair();
$metadataKeyValuePair7->setOdataType('#microsoft.graph.keyValuePair');
$metadataKeyValuePair7->setName('MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ActionId');
$metadataKeyValuePair7->setValue('00000000-0000-0000-0000-000000000000');
$metadataArray []= $metadataKeyValuePair7;
$contentInfo->setMetadata($metadataArray);
$additionalData = [
'format@odata.type' => '#microsoft.graph.contentFormat',
'state@odata.type' => '#microsoft.graph.contentState',
'metadata@odata.type' => '#Collection(microsoft.graph.keyValuePair)',
];
$contentInfo->setAdditionalData($additionalData);
$requestBody->setContentInfo($contentInfo);
$requestConfiguration = new ExtractLabelRequestBuilderPostRequestConfiguration();
$headers = [
'User-Agent' => 'ContosoLOBApp/1.0',
];
$requestConfiguration->headers = $headers;
$result = $graphServiceClient->informationProtection()->policy()->labels()->extractLabel()->post($requestBody, $requestConfiguration)->wait();
Import-Module Microsoft.Graph.Beta.Identity.SignIns
$params = @{
contentInfo = @{
"@odata.type" = "#microsoft.graph.contentInfo"
"format@odata.type" = "#microsoft.graph.contentFormat"
format = "default"
identifier = $null
"state@odata.type" = "#microsoft.graph.contentState"
state = "rest"
"metadata@odata.type" = "#Collection(microsoft.graph.keyValuePair)"
metadata = @(
@{
"@odata.type" = "#microsoft.graph.keyValuePair"
name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Enabled"
value = "True"
}
@{
"@odata.type" = "#microsoft.graph.keyValuePair"
name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Method"
value = "Standard"
}
@{
"@odata.type" = "#microsoft.graph.keyValuePair"
name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SetDate"
value = "1/1/0001 12:00:00 AM"
}
@{
"@odata.type" = "#microsoft.graph.keyValuePair"
name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SiteId"
value = "cfa4cf1d-a337-4481-aa99-19d8f3d63f7c"
}
@{
"@odata.type" = "#microsoft.graph.keyValuePair"
name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Name"
value = "Top Secret"
}
@{
"@odata.type" = "#microsoft.graph.keyValuePair"
name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ContentBits"
value = "0"
}
@{
"@odata.type" = "#microsoft.graph.keyValuePair"
name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ActionId"
value = "00000000-0000-0000-0000-000000000000"
}
)
}
}
Invoke-MgBetaExtractInformationProtectionPolicyLabel -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.information_protection.policy.labels.extract_label.extract_label_request_builder import ExtractLabelRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
from msgraph_beta.generated.informationprotection.policy.labels.extract_label.extract_label_post_request_body import ExtractLabelPostRequestBody
from msgraph_beta.generated.models.content_info import ContentInfo
from msgraph_beta.generated.models.content_format import ContentFormat
from msgraph_beta.generated.models.content_state import ContentState
from msgraph_beta.generated.models.key_value_pair import KeyValuePair
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ExtractLabelPostRequestBody(
content_info = ContentInfo(
odata_type = "#microsoft.graph.contentInfo",
format = ContentFormat.Default,
identifier = None,
state = ContentState.Rest,
metadata = [
KeyValuePair(
odata_type = "#microsoft.graph.keyValuePair",
name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Enabled",
value = "True",
),
KeyValuePair(
odata_type = "#microsoft.graph.keyValuePair",
name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Method",
value = "Standard",
),
KeyValuePair(
odata_type = "#microsoft.graph.keyValuePair",
name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SetDate",
value = "1/1/0001 12:00:00 AM",
),
KeyValuePair(
odata_type = "#microsoft.graph.keyValuePair",
name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SiteId",
value = "cfa4cf1d-a337-4481-aa99-19d8f3d63f7c",
),
KeyValuePair(
odata_type = "#microsoft.graph.keyValuePair",
name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Name",
value = "Top Secret",
),
KeyValuePair(
odata_type = "#microsoft.graph.keyValuePair",
name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ContentBits",
value = "0",
),
KeyValuePair(
odata_type = "#microsoft.graph.keyValuePair",
name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ActionId",
value = "00000000-0000-0000-0000-000000000000",
),
],
additional_data = {
"format@odata_type" : "#microsoft.graph.contentFormat",
"state@odata_type" : "#microsoft.graph.contentState",
"metadata@odata_type" : "#Collection(microsoft.graph.keyValuePair)",
}
),
)
request_configuration = RequestConfiguration()
request_configuration.headers.add("User-Agent", "ContosoLOBApp/1.0")
result = await graph_client.information_protection.policy.labels.extract_label.post(request_body, request_configuration = request_configuration)
Ниже показан пример отклика.