名前空間: microsoft.graph
入力コンテンツとラベルに基づいて秘密度ラベルの権限と継承を計算します。
この API は、次の国内クラウド展開で使用できます。
| グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
| ✅ |
❌ |
❌ |
❌ |
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
| アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
| 委任 (職場または学校のアカウント) |
SensitivityLabel.Evaluate.All |
SensitivityLabel.Evaluate |
| 委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
| アプリケーション |
SensitivityLabel.Evaluate.All |
SensitivityLabel.Evaluate |
HTTP 要求
POST /security/dataSecurityAndGovernance/sensitivityLabels/computeRightsAndInheritance
| 名前 |
説明 |
| Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
| Content-Type |
application/json. 必須です。 |
要求本文
要求本文で、パラメーターの JSON 表現を指定します。
次の表に、このアクションを呼び出すときに必要なパラメーターを示します。
| パラメーター |
型 |
説明 |
| delegatedUserEmail |
文字列 |
権限と継承が計算されているユーザーの upn。 |
| ロケール |
文字列 |
継承されたラベル コンテンツに使用するローカライズ コード ("en-US" など)。 |
| protectedContents |
protectedContent コレクション |
権利と継承が計算される保護されたコンテンツ エンティティのコレクション。 |
| supportedContentFormats |
String collection |
権限と継承の計算に含めるコンテンツ形式のコレクション (たとえば、 email、 file)。 |
応答
成功した場合、このアクションは応答本文に 200 OK 応答コードと computeRightsAndInheritanceResult を返します。
例
要求
次の例は要求を示しています。
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);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// 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)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// 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);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
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);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
<?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();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
# 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)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": {
"@odata.type": "microsoft.graph.computeRightsAndInheritanceResult"
}
}