APIs unter der /beta Version in Microsoft Graph können geändert werden. Die Verwendung dieser APIs in Produktionsanwendungen wird nicht unterstützt. Um festzustellen, ob eine API in Version 1.0 verfügbar ist, verwenden Sie die Versionsauswahl .
Lösen Sie mithilfe der Metadaten, die für bereits bezeichnete Informationen vorhanden sind, die Metadaten in eine bestimmte Vertraulichkeitsbezeichnung auf. Die contentInfo-Eingabe wird in informationProtectionContentLabel aufgelöst.
Hinweis
Die InformationProtectionContentLabel-Ressource stellt eine Vertraulichkeitsbezeichnung dar, die auf eine Information angewendet wurde. informationProtectionLabel-Objekte sind die abstrakten Bezeichnungen, die Teil der Bezeichnungsrichtlinie der Organisation sind und auf Informationen angewendet werden können.
Berechtigungen
Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie im Artikel zum Thema Berechtigungen.
Berechtigungstyp
Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)
Delegiert (Geschäfts-, Schul- oder Unikonto)
InformationProtectionPolicy.Read
Delegiert (persönliches Microsoft-Konto)
Nicht unterstützt
Anwendung
InformationProtectionPolicy.Read.All
HTTP-Anforderung
POST /informationprotection/policy/labels/extractLabel
Anforderungsheader
Name
Beschreibung
Authorization
Bearer {token}. Erforderlich.
Content-type
Inhaltstyp: application/json. Erforderlich.
User-Agent
Beschreibt den Namen und die Version der aufrufenden Anwendung. Details werden in Azure Information Protection Analytics angezeigt. Das vorgeschlagene Format ist ApplicationName/Version. Optional.
Anforderungstext
Geben Sie im Anforderungstext ein JSON-Objekt mit den folgenden Parametern an.
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var contentInfo = new ContentInfo
{
Format = ContentFormat.Default,
Identifier = null,
State = ContentState.Rest,
Metadata = new List<KeyValuePair>()
{
new KeyValuePair
{
Name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Enabled",
Value = "True"
},
new KeyValuePair
{
Name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Method",
Value = "Standard"
},
new KeyValuePair
{
Name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SetDate",
Value = "1/1/0001 12:00:00 AM"
},
new KeyValuePair
{
Name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SiteId",
Value = "cfa4cf1d-a337-4481-aa99-19d8f3d63f7c"
},
new KeyValuePair
{
Name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Name",
Value = "Top Secret"
},
new KeyValuePair
{
Name = "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ContentBits",
Value = "0"
},
new 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)"}
}
};
await graphClient.InformationProtection.Policy.Labels
.ExtractLabel(contentInfo)
.Request()
.Header("User-Agent","ContosoLOBApp/1.0")
.PostAsync();
Wichtig
Microsoft Graph SDKs verwenden standardmäßig die Version 1.0 der API und unterstützen nicht alle Typen, Eigenschaften und APIs, die in der Betaversion verfügbar sind. Ausführliche Informationen zum Zugreifen auf die Beta-API mit dem SDK finden Sie unter Verwenden der Microsoft Graph-SDKs mit der Beta-API.
Microsoft Graph SDKs verwenden standardmäßig die Version 1.0 der API und unterstützen nicht alle Typen, Eigenschaften und APIs, die in der Betaversion verfügbar sind. Ausführliche Informationen zum Zugreifen auf die Beta-API mit dem SDK finden Sie unter Verwenden der Microsoft Graph-SDKs mit der Beta-API.
Microsoft Graph SDKs verwenden standardmäßig die Version 1.0 der API und unterstützen nicht alle Typen, Eigenschaften und APIs, die in der Betaversion verfügbar sind. Ausführliche Informationen zum Zugreifen auf die Beta-API mit dem SDK finden Sie unter Verwenden der Microsoft Graph-SDKs mit der Beta-API.
Microsoft Graph SDKs verwenden standardmäßig die Version 1.0 der API und unterstützen nicht alle Typen, Eigenschaften und APIs, die in der Betaversion verfügbar sind. Ausführliche Informationen zum Zugreifen auf die Beta-API mit dem SDK finden Sie unter Verwenden der Microsoft Graph-SDKs mit der Beta-API.
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewContentInfoRequestBody()
contentInfo := msgraphsdk.NewContentInfo()
requestBody.SetContentInfo(contentInfo)
format := "default"
contentInfo.SetFormat(&format)
contentInfo.SetIdentifier(nil)
state := "rest"
contentInfo.SetState(&state)
contentInfo.SetMetadata( []KeyValuePair {
msgraphsdk.NewKeyValuePair(),
name := "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Enabled"
SetName(&name)
value := "True"
SetValue(&value)
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.keyValuePair",
}
msgraphsdk.NewKeyValuePair(),
name := "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Method"
SetName(&name)
value := "Standard"
SetValue(&value)
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.keyValuePair",
}
msgraphsdk.NewKeyValuePair(),
name := "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SetDate"
SetName(&name)
value := "1/1/0001 12:00:00 AM"
SetValue(&value)
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.keyValuePair",
}
msgraphsdk.NewKeyValuePair(),
name := "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_SiteId"
SetName(&name)
value := "cfa4cf1d-a337-4481-aa99-19d8f3d63f7c"
SetValue(&value)
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.keyValuePair",
}
msgraphsdk.NewKeyValuePair(),
name := "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_Name"
SetName(&name)
value := "Top Secret"
SetValue(&value)
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.keyValuePair",
}
msgraphsdk.NewKeyValuePair(),
name := "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ContentBits"
SetName(&name)
value := "0"
SetValue(&value)
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.keyValuePair",
}
msgraphsdk.NewKeyValuePair(),
name := "MSIP_Label_722a5300-ac39-4c9a-88e3-f54c46676417_ActionId"
SetName(&name)
value := "00000000-0000-0000-0000-000000000000"
SetValue(&value)
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.keyValuePair",
}
}
contentInfo.SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.contentInfo",
"format@odata.type": "#microsoft.graph.contentFormat",
"state@odata.type": "#microsoft.graph.contentState",
"metadata@odata.type": "#Collection(microsoft.graph.keyValuePair)",
}
headers := map[string]string{
"User-Agent": "ContosoLOBApp/1.0"
}
options := &msgraphsdk.ExtractLabelRequestBuilderPostRequestConfiguration{
Headers: headers,
}
result, err := graphClient.InformationProtection().Policy().Labels().ExtractLabel().PostWithRequestConfigurationAndResponseHandler(requestBody, options, nil)
Wichtig
Microsoft Graph SDKs verwenden standardmäßig die Version 1.0 der API und unterstützen nicht alle Typen, Eigenschaften und APIs, die in der Betaversion verfügbar sind. Ausführliche Informationen zum Zugreifen auf die Beta-API mit dem SDK finden Sie unter Verwenden der Microsoft Graph-SDKs mit der Beta-API.
Import-Module Microsoft.Graph.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-MgExtractInformationProtectionPolicyLabel -BodyParameter $params
Wichtig
Microsoft Graph SDKs verwenden standardmäßig die Version 1.0 der API und unterstützen nicht alle Typen, Eigenschaften und APIs, die in der Betaversion verfügbar sind. Ausführliche Informationen zum Zugreifen auf die Beta-API mit dem SDK finden Sie unter Verwenden der Microsoft Graph-SDKs mit der Beta-API.