Namespace: microsoft.graph
Berechnet die Rechte und die Vererbung für Vertraulichkeitsbezeichnungen basierend auf dem Eingabeinhalt und den Bezeichnungen.
Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.
| Weltweiter Service |
US Government L4 |
US Government L5 (DOD) |
China, betrieben von 21Vianet |
| ✅ |
❌ |
❌ |
❌ |
Berechtigungen
Wählen Sie die Berechtigungen aus, die für diese API als am wenigsten privilegiert markiert sind. Verwenden Sie eine höhere Berechtigung oder Berechtigungen nur, wenn Ihre App dies erfordert. Ausführliche Informationen zu delegierten Berechtigungen und Anwendungsberechtigungen finden Sie unter Berechtigungstypen. Weitere Informationen zu diesen Berechtigungen finden Sie in der Berechtigungsreferenz.
| Berechtigungstyp |
Berechtigungen mit den geringsten Berechtigungen |
Berechtigungen mit höheren Berechtigungen |
| Delegiert (Geschäfts-, Schul- oder Unikonto) |
SensitivityLabel.Evaluate.All |
SensitivityLabel.Evaluate |
| Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Nicht unterstützt |
| Application |
SensitivityLabel.Evaluate.All |
SensitivityLabel.Evaluate |
HTTP-Anforderung
POST /security/dataSecurityAndGovernance/sensitivityLabels/computeRightsAndInheritance
Anforderungstext
Geben Sie im Anforderungstext eine JSON-Darstellung der Parameter an.
In der folgenden Tabelle sind die Parameter aufgeführt, die beim Aufrufen dieser Aktion erforderlich sind.
| Parameter |
Typ |
Beschreibung |
| delegatedUserEmail |
Zeichenfolge |
Der Upn des Benutzers, für den die Rechte und die Vererbung berechnet werden. |
| Gebietsschema |
Zeichenfolge |
Der Lokalisierungscode (z. B. "en-US"), der für den geerbten Bezeichnungsinhalt verwendet werden soll. |
| protectedContents |
protectedContent-Sammlung |
Eine Sammlung geschützter Inhaltsentitäten, für die Rechte und Vererbung berechnet werden. |
| supportedContentFormats |
Zeichenfolgensammlung |
Eine Auflistung von Inhaltsformaten (z. B email. , file), die in die Rechte- und Vererbungsberechnung einbezogen werden sollen. |
Antwort
Wenn die Aktion erfolgreich verläuft, werden der 200 OK Antwortcode und ein computeRightsAndInheritanceResult im Antworttext zurückgegeben.
Beispiele
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
POST https://graph.microsoft.com/v1.0/security/dataSecurityAndGovernance/sensitivityLabels/computeRightsAndInheritance
Content-Type: application/json
{
"delegatedUserEmail": "String",
"locale": "String",
"protectedContents": [
{
"@odata.type": "microsoft.graph.protectedContent"
}
],
"supportedContentFormats": [
"String"
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Security.DataSecurityAndGovernance.SensitivityLabels.ComputeRightsAndInheritance;
using Microsoft.Graph.Models;
var requestBody = new ComputeRightsAndInheritancePostRequestBody
{
DelegatedUserEmail = "String",
Locale = "String",
ProtectedContents = new List<ProtectedContent>
{
new ProtectedContent
{
OdataType = "microsoft.graph.protectedContent",
},
},
SupportedContentFormats = new List<string>
{
"String",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Security.DataSecurityAndGovernance.SensitivityLabels.ComputeRightsAndInheritance.PostAsync(requestBody);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphsecurity "github.com/microsoftgraph/msgraph-sdk-go/security"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphsecurity.NewComputeRightsAndInheritancePostRequestBody()
delegatedUserEmail := "String"
requestBody.SetDelegatedUserEmail(&delegatedUserEmail)
locale := "String"
requestBody.SetLocale(&locale)
protectedContent := graphmodels.NewProtectedContent()
protectedContents := []graphmodels.ProtectedContentable {
protectedContent,
}
requestBody.SetProtectedContents(protectedContents)
supportedContentFormats := []string {
"String",
}
requestBody.SetSupportedContentFormats(supportedContentFormats)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
computeRightsAndInheritance, err := graphClient.Security().DataSecurityAndGovernance().SensitivityLabels().ComputeRightsAndInheritance().Post(context.Background(), requestBody, nil)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.security.datasecurityandgovernance.sensitivitylabels.computerightsandinheritance.ComputeRightsAndInheritancePostRequestBody computeRightsAndInheritancePostRequestBody = new com.microsoft.graph.security.datasecurityandgovernance.sensitivitylabels.computerightsandinheritance.ComputeRightsAndInheritancePostRequestBody();
computeRightsAndInheritancePostRequestBody.setDelegatedUserEmail("String");
computeRightsAndInheritancePostRequestBody.setLocale("String");
LinkedList<ProtectedContent> protectedContents = new LinkedList<ProtectedContent>();
ProtectedContent protectedContent = new ProtectedContent();
protectedContent.setOdataType("microsoft.graph.protectedContent");
protectedContents.add(protectedContent);
computeRightsAndInheritancePostRequestBody.setProtectedContents(protectedContents);
LinkedList<String> supportedContentFormats = new LinkedList<String>();
supportedContentFormats.add("String");
computeRightsAndInheritancePostRequestBody.setSupportedContentFormats(supportedContentFormats);
var result = graphClient.security().dataSecurityAndGovernance().sensitivityLabels().computeRightsAndInheritance().post(computeRightsAndInheritancePostRequestBody);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
const options = {
authProvider,
};
const client = Client.init(options);
const computeRightsAndInheritanceResult = {
delegatedUserEmail: 'String',
locale: 'String',
protectedContents: [
{
'@odata.type': 'microsoft.graph.protectedContent'
}
],
supportedContentFormats: [
'String'
]
};
await client.api('/security/dataSecurityAndGovernance/sensitivityLabels/computeRightsAndInheritance')
.post(computeRightsAndInheritanceResult);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Security\DataSecurityAndGovernance\SensitivityLabels\ComputeRightsAndInheritance\ComputeRightsAndInheritancePostRequestBody;
use Microsoft\Graph\Generated\Models\ProtectedContent;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ComputeRightsAndInheritancePostRequestBody();
$requestBody->setDelegatedUserEmail('String');
$requestBody->setLocale('String');
$protectedContentsProtectedContent1 = new ProtectedContent();
$protectedContentsProtectedContent1->setOdataType('microsoft.graph.protectedContent');
$protectedContentsArray []= $protectedContentsProtectedContent1;
$requestBody->setProtectedContents($protectedContentsArray);
$requestBody->setSupportedContentFormats(['String', ]);
$result = $graphServiceClient->security()->dataSecurityAndGovernance()->sensitivityLabels()->computeRightsAndInheritance()->post($requestBody)->wait();
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.security.datasecurityandgovernance.sensitivitylabels.compute_rights_and_inheritance.compute_rights_and_inheritance_post_request_body import ComputeRightsAndInheritancePostRequestBody
from msgraph.generated.models.protected_content import ProtectedContent
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ComputeRightsAndInheritancePostRequestBody(
delegated_user_email = "String",
locale = "String",
protected_contents = [
ProtectedContent(
odata_type = "microsoft.graph.protectedContent",
),
],
supported_content_formats = [
"String",
],
)
result = await graph_client.security.data_security_and_governance.sensitivity_labels.compute_rights_and_inheritance.post(request_body)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Antwort
Das folgende Beispiel zeigt die Antwort.
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": {
"@odata.type": "microsoft.graph.computeRightsAndInheritanceResult"
}
}