One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
In the request body, provide a JSON object with the following parameters.
The following example shows how to call this API.
The following is an example of the request.
POST https://graph.microsoft.com/beta/informationProtection/policy/labels/evaluateApplication
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": "General"
},
{
"@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"
}
]
},
"labelingOptions": {
"@odata.type": "#microsoft.graph.labelingOptions",
"assignmentMethod@odata.type": "#microsoft.graph.assignmentMethod",
"assignmentMethod": "standard",
"labelId@odata.type": "#Guid",
"labelId": "97309856-9c28-4ac6-9382-5f8bc20c457b",
"downgradeJustification": null,
"extendedProperties@odata.type": "#Collection(microsoft.graph.keyValuePair)",
"extendedProperties": []
}
}
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody
{
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 = "General",
},
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)"
},
},
},
LabelingOptions = new LabelingOptions
{
OdataType = "#microsoft.graph.labelingOptions",
AssignmentMethod = AssignmentMethod.Standard,
LabelId = "97309856-9c28-4ac6-9382-5f8bc20c457b",
DowngradeJustification = null,
ExtendedProperties = new List<KeyValuePair>
{
},
AdditionalData = new Dictionary<string, object>
{
{
"assignmentMethod@odata.type" , "#microsoft.graph.assignmentMethod"
},
{
"labelId@odata.type" , "#Guid"
},
{
"extendedProperties@odata.type" , "#Collection(microsoft.graph.keyValuePair)"
},
},
},
};
var result = await graphClient.InformationProtection.Policy.Labels.EvaluateApplication.PostAsync(requestBody, (requestConfiguration) =>
{
requestConfiguration.Headers.Add("User-Agent", "ContosoLOBApp/1.0");
});
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta information-protection policy labels evaluate-application 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": "General"\
},\
{\
"@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"\
}\
]\
},\
"labelingOptions": {\
"@odata.type": "#microsoft.graph.labelingOptions",\
"assignmentMethod@odata.type": "#microsoft.graph.assignmentMethod",\
"assignmentMethod": "standard",\
"labelId@odata.type": "#Guid",\
"labelId": "97309856-9c28-4ac6-9382-5f8bc20c457b",\
"downgradeJustification": null,\
"extendedProperties@odata.type": "#Collection(microsoft.graph.keyValuePair)",\
"extendedProperties": []\
}\
}\
'
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
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
headers := abstractions.NewRequestHeaders()
headers.Add("User-Agent", "ContosoLOBApp/1.0")
configuration := &graphinformationprotection.InformationProtectionPolicyLabelsEvaluateApplicationRequestBuilderPostRequestConfiguration{
Headers: headers,
}
requestBody := graphinformationprotection.NewEvaluateApplicationPostRequestBody()
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 := "General"
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{}{
"odataType" : "#microsoft.graph.contentFormat",
"odataType" : "#microsoft.graph.contentState",
"odataType" : "#Collection(microsoft.graph.keyValuePair)",
}
contentInfo.SetAdditionalData(additionalData)
requestBody.SetContentInfo(contentInfo)
labelingOptions := graphmodels.NewLabelingOptions()
assignmentMethod := graphmodels.STANDARD_ASSIGNMENTMETHOD
labelingOptions.SetAssignmentMethod(&assignmentMethod)
labelId := "97309856-9c28-4ac6-9382-5f8bc20c457b"
labelingOptions.SetLabelId(&labelId)
downgradeJustification := null
labelingOptions.SetDowngradeJustification(&downgradeJustification)
extendedProperties := []graphmodels.KeyValuePairable {
}
labelingOptions.SetExtendedProperties(extendedProperties)
additionalData := map[string]interface{}{
"odataType" : "#microsoft.graph.assignmentMethod",
"odataType" : "#Guid",
"odataType" : "#Collection(microsoft.graph.keyValuePair)",
}
labelingOptions.SetAdditionalData(additionalData)
requestBody.SetLabelingOptions(labelingOptions)
evaluateApplication, err := graphClient.InformationProtection().Policy().Labels().EvaluateApplication().Post(context.Background(), requestBody, configuration)
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
LinkedList<Option> requestOptions = new LinkedList<Option>();
requestOptions.add(new HeaderOption("User-Agent", "ContosoLOBApp/1.0"));
ContentInfo contentInfo = new ContentInfo();
contentInfo.additionalDataManager().put("format@odata.type", new JsonPrimitive("#microsoft.graph.contentFormat"));
contentInfo.format = ContentFormat.DEFAULT;
contentInfo.identifier = null;
contentInfo.additionalDataManager().put("state@odata.type", new JsonPrimitive("#microsoft.graph.contentState"));
contentInfo.state = ContentState.REST;
contentInfo.additionalDataManager().put("metadata@odata.type", new JsonPrimitive("#Collection(microsoft.graph.keyValuePair)"));
LinkedList<KeyValuePair> metadataList = new LinkedList<KeyValuePair>();
KeyValuePair metadata = new KeyValuePair();
metadata.name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Enabled";
metadata.value = "True";
metadataList.add(metadata);
KeyValuePair metadata1 = new KeyValuePair();
metadata1.name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Method";
metadata1.value = "Standard";
metadataList.add(metadata1);
KeyValuePair metadata2 = new KeyValuePair();
metadata2.name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SetDate";
metadata2.value = "1/1/0001 12:00:00 AM";
metadataList.add(metadata2);
KeyValuePair metadata3 = new KeyValuePair();
metadata3.name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SiteId";
metadata3.value = "cfa4cf1d-a337-4481-aa99-19d8f3d63f7c";
metadataList.add(metadata3);
KeyValuePair metadata4 = new KeyValuePair();
metadata4.name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Name";
metadata4.value = "General";
metadataList.add(metadata4);
KeyValuePair metadata5 = new KeyValuePair();
metadata5.name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ContentBits";
metadata5.value = "0";
metadataList.add(metadata5);
KeyValuePair metadata6 = new KeyValuePair();
metadata6.name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ActionId";
metadata6.value = "00000000-0000-0000-0000-000000000000";
metadataList.add(metadata6);
contentInfo.metadata = metadataList;
LabelingOptions labelingOptions = new LabelingOptions();
labelingOptions.additionalDataManager().put("assignmentMethod@odata.type", new JsonPrimitive("#microsoft.graph.assignmentMethod"));
labelingOptions.assignmentMethod = AssignmentMethod.STANDARD;
labelingOptions.additionalDataManager().put("labelId@odata.type", new JsonPrimitive("#Guid"));
labelingOptions.labelId = "97309856-9c28-4ac6-9382-5f8bc20c457b";
labelingOptions.downgradeJustification = null;
labelingOptions.additionalDataManager().put("extendedProperties@odata.type", new JsonPrimitive("#Collection(microsoft.graph.keyValuePair)"));
LinkedList<KeyValuePair> extendedPropertiesList = new LinkedList<KeyValuePair>();
labelingOptions.extendedProperties = extendedPropertiesList;
graphClient.informationProtection().policy().labels()
.evaluateApplication(InformationProtectionLabelEvaluateApplicationParameterSet
.newBuilder()
.withContentInfo(contentInfo)
.withLabelingOptions(labelingOptions)
.build())
.buildRequest( requestOptions )
.post();
const options = {
authProvider,
};
const client = Client.init(options);
const informationProtectionAction = {
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: 'General'
},
{
'@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'
}
]
},
labelingOptions: {
'@odata.type': '#microsoft.graph.labelingOptions',
'assignmentMethod@odata.type': '#microsoft.graph.assignmentMethod',
assignmentMethod: 'standard',
'labelId@odata.type': '#Guid',
labelId: '97309856-9c28-4ac6-9382-5f8bc20c457b',
downgradeJustification: null,
'extendedProperties@odata.type': '#Collection(microsoft.graph.keyValuePair)',
extendedProperties: []
}
};
await client.api('/informationProtection/policy/labels/evaluateApplication')
.version('beta')
.post(informationProtectionAction);
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new EvaluateApplicationPostRequestBody();
$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('General');
$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);
$labelingOptions = new LabelingOptions();
$labelingOptions->setOdataType('#microsoft.graph.labelingOptions');
$labelingOptions->setAssignmentMethod(new AssignmentMethod('standard'));
$labelingOptions->setLabelId('97309856-9c28-4ac6-9382-5f8bc20c457b');
$labelingOptions->setDowngradeJustification(null);
$labelingOptions->setExtendedProperties([]);
$additionalData = [
'assignmentMethod@odata.type' => '#microsoft.graph.assignmentMethod',
'labelId@odata.type' => '#Guid',
'extendedProperties@odata.type' => '#Collection(microsoft.graph.keyValuePair)',
];
$labelingOptions->setAdditionalData($additionalData);
$requestBody->setLabelingOptions($labelingOptions);
$requestConfiguration = new EvaluateApplicationRequestBuilderPostRequestConfiguration();
$headers = [
'User-Agent' => 'ContosoLOBApp/1.0',
];
$requestConfiguration->headers = $headers;
$result = $graphServiceClient->informationProtection()->policy()->labels()->evaluateApplication()->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 = "General"
}
@{
"@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"
}
)
}
labelingOptions = @{
"@odata.type" = "#microsoft.graph.labelingOptions"
"assignmentMethod@odata.type" = "#microsoft.graph.assignmentMethod"
assignmentMethod = "standard"
"labelId@odata.type" = "#Guid"
labelId = "97309856-9c28-4ac6-9382-5f8bc20c457b"
downgradeJustification = $null
"extendedProperties@odata.type" = "#Collection(microsoft.graph.keyValuePair)"
extendedProperties = @(
)
}
}
Test-MgBetaInformationProtectionPolicyLabelApplication -BodyParameter $params
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(request_adapter)
request_body = EvaluateApplicationPostRequestBody(
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 = "General",
),
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)",
}
),
labeling_options = LabelingOptions(
odata_type = "#microsoft.graph.labelingOptions",
assignment_method = AssignmentMethod.Standard,
label_id = "97309856-9c28-4ac6-9382-5f8bc20c457b",
downgrade_justification = None,
extended_properties = [
]
additional_data = {
"assignment_method@odata_type" : "#microsoft.graph.assignmentMethod",
"label_id@odata_type" : "#Guid",
"extended_properties@odata_type" : "#Collection(microsoft.graph.keyValuePair)",
}
),
)
request_configuration = EvaluateApplicationRequestBuilder.EvaluateApplicationRequestBuilderPostRequestConfiguration(
headers = {
'User-Agent' : "ContosoLOBApp/1.0",
}
)
result = await graph_client.information_protection.policy.labels.evaluate_application.post(body = request_body, request_configuration = request_configuration)
The following is an example of the response.