名前空間: microsoft.graph
マルチテナント organizationの受信パートナーと送信パートナーの構成設定を使用して、テナント間アクセス ポリシー テンプレートを更新します。
この API は、次の国内クラウド展開で使用できます。
| グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
| ✅ |
❌ |
❌ |
❌ |
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
| アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
| 委任 (職場または学校のアカウント) |
Policy.ReadWrite.CrossTenantAccess |
注意事項なし。 |
| 委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
| アプリケーション |
Policy.ReadWrite.CrossTenantAccess |
注意事項なし。 |
重要
職場または学校アカウントを使用した委任されたアクセスの場合、サインインしているユーザーには、サポートされているMicrosoft Entraロールまたはこの操作に必要なアクセス許可を付与するカスタム ロールが割り当てられている必要があります。
セキュリティ管理者 は、この操作でサポートされる最小限の特権ロールです。
HTTP 要求
PATCH /policies/crossTenantAccessPolicy/templates/multiTenantOrganizationPartnerConfiguration
| 名前 |
説明 |
| Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
| Content-Type |
application/json. 必須です。 |
要求本文
要求本文で、更新するプロパティの値 のみを 指定します。 要求本文に含まれていない既存のプロパティは、以前の値を維持するか、他のプロパティ値の変更に基づいて再計算されます。
次の表に、更新できるプロパティを示します。
| プロパティ |
型 |
説明 |
| inboundTrust |
crossTenantAccessPolicyInboundTrust |
外部Microsoft Entra組織から他の条件付きアクセス要求を信頼するためのパートナー固有の構成を決定します。 省略可能。 |
| b2bCollaborationOutbound |
crossTenantAccessPolicyB2BSetting |
B2B コラボレーションを介して別のorganization内のリソースにアクセスするために送信するorganizationのユーザー Microsoft Entraパートナー固有の構成を定義します。 省略可能。 |
| b2bCollaborationInbound |
crossTenantAccessPolicyB2BSetting |
B2B コラボレーションを介してリソースにアクセスする他の組織のユーザー Microsoft Entraパートナー固有の構成を定義します。 省略可能。 |
| b2bDirectConnectOutbound |
crossTenantAccessPolicyB2BSetting |
B2B 直接接続を使用して別のorganization内のリソースにアクセスするorganization内のユーザー Microsoft Entraパートナー固有の構成を定義します。 省略可能。 |
| b2bDirectConnectInbound |
crossTenantAccessPolicyB2BSetting |
B2B 直接接続を介してリソースにアクセスする他の組織のユーザー Microsoft Entraパートナー固有の構成を定義します。 省略可能。 |
| automaticUserConsentSettings |
inboundOutboundPolicyConfiguration |
自動ユーザー同意設定のパートナー固有の構成を決定します。 省略可能。 |
| templateApplicationLevel |
templateApplicationLevel |
テンプレートを特定のテナントのパートナー構成設定に適用するかどうかを指定します。 使用可能な値: none、newPartners、existingPartners、unknownFutureValue。
newPartners,existingPartners (既定値) などの複数の値を指定することもできます。
none は、テンプレートが新規または既存のパートナー テナントに適用されていないことを示します。
newPartners は、テンプレートが新しいパートナー テナントに適用されていることを示します。
existingPartners は、テンプレートが既存のパートナー テナント (パートナー固有のパートナー構成が既に設定されているテナント) に適用されていることを示します。 省略可能。 |
応答
成功した場合、このメソッドは 204 No Content 応答コードを返します。
例
次の例では、パートナー テナントから、MFA、準拠、およびMicrosoft Entraハイブリッド参加済みデバイスを受け入れるように受信信頼設定を構成します。 ユーザーに代わって自動引き換えが構成され、パートナーのユーザーに対する管理者の同意が受け入れられます。 テンプレートが新規および既存のパートナーに適用されることを構成します。 詳細については、「 crossTenantAccessPolicyConfigurationPartner リソースの種類」を参照してください。
要求
PATCH https://graph.microsoft.com/v1.0/policies/crossTenantAccessPolicy/templates/multiTenantOrganizationPartnerConfiguration
Content-Type: application/json
{
"inboundTrust": {
"isMfaAccepted": true,
"isCompliantDeviceAccepted": true,
"isHybridAzureADJoinedDeviceAccepted": true
},
"automaticUserConsentSettings": {
"inboundAllowed": true,
"outboundAllowed": true
},
"templateApplicationLevel": "newPartners,existingPartners"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new MultiTenantOrganizationPartnerConfigurationTemplate
{
InboundTrust = new CrossTenantAccessPolicyInboundTrust
{
IsMfaAccepted = true,
IsCompliantDeviceAccepted = true,
IsHybridAzureADJoinedDeviceAccepted = true,
},
AutomaticUserConsentSettings = new InboundOutboundPolicyConfiguration
{
InboundAllowed = true,
OutboundAllowed = true,
},
TemplateApplicationLevel = TemplateApplicationLevel.NewPartners | TemplateApplicationLevel.ExistingPartners,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Policies.CrossTenantAccessPolicy.Templates.MultiTenantOrganizationPartnerConfiguration.PatchAsync(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"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewMultiTenantOrganizationPartnerConfigurationTemplate()
inboundTrust := graphmodels.NewCrossTenantAccessPolicyInboundTrust()
isMfaAccepted := true
inboundTrust.SetIsMfaAccepted(&isMfaAccepted)
isCompliantDeviceAccepted := true
inboundTrust.SetIsCompliantDeviceAccepted(&isCompliantDeviceAccepted)
isHybridAzureADJoinedDeviceAccepted := true
inboundTrust.SetIsHybridAzureADJoinedDeviceAccepted(&isHybridAzureADJoinedDeviceAccepted)
requestBody.SetInboundTrust(inboundTrust)
automaticUserConsentSettings := graphmodels.NewInboundOutboundPolicyConfiguration()
inboundAllowed := true
automaticUserConsentSettings.SetInboundAllowed(&inboundAllowed)
outboundAllowed := true
automaticUserConsentSettings.SetOutboundAllowed(&outboundAllowed)
requestBody.SetAutomaticUserConsentSettings(automaticUserConsentSettings)
templateApplicationLevel := graphmodels.NEWPARTNERS,EXISTINGPARTNERS_TEMPLATEAPPLICATIONLEVEL
requestBody.SetTemplateApplicationLevel(&templateApplicationLevel)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
multiTenantOrganizationPartnerConfiguration, err := graphClient.Policies().CrossTenantAccessPolicy().Templates().MultiTenantOrganizationPartnerConfiguration().Patch(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);
MultiTenantOrganizationPartnerConfigurationTemplate multiTenantOrganizationPartnerConfigurationTemplate = new MultiTenantOrganizationPartnerConfigurationTemplate();
CrossTenantAccessPolicyInboundTrust inboundTrust = new CrossTenantAccessPolicyInboundTrust();
inboundTrust.setIsMfaAccepted(true);
inboundTrust.setIsCompliantDeviceAccepted(true);
inboundTrust.setIsHybridAzureADJoinedDeviceAccepted(true);
multiTenantOrganizationPartnerConfigurationTemplate.setInboundTrust(inboundTrust);
InboundOutboundPolicyConfiguration automaticUserConsentSettings = new InboundOutboundPolicyConfiguration();
automaticUserConsentSettings.setInboundAllowed(true);
automaticUserConsentSettings.setOutboundAllowed(true);
multiTenantOrganizationPartnerConfigurationTemplate.setAutomaticUserConsentSettings(automaticUserConsentSettings);
multiTenantOrganizationPartnerConfigurationTemplate.setTemplateApplicationLevel(EnumSet.of(TemplateApplicationLevel.NewPartners, TemplateApplicationLevel.ExistingPartners));
MultiTenantOrganizationPartnerConfigurationTemplate result = graphClient.policies().crossTenantAccessPolicy().templates().multiTenantOrganizationPartnerConfiguration().patch(multiTenantOrganizationPartnerConfigurationTemplate);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
const multiTenantOrganizationPartnerConfigurationTemplate = {
inboundTrust: {
isMfaAccepted: true,
isCompliantDeviceAccepted: true,
isHybridAzureADJoinedDeviceAccepted: true
},
automaticUserConsentSettings: {
inboundAllowed: true,
outboundAllowed: true
},
templateApplicationLevel: 'newPartners,existingPartners'
};
await client.api('/policies/crossTenantAccessPolicy/templates/multiTenantOrganizationPartnerConfiguration')
.update(multiTenantOrganizationPartnerConfigurationTemplate);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\MultiTenantOrganizationPartnerConfigurationTemplate;
use Microsoft\Graph\Generated\Models\CrossTenantAccessPolicyInboundTrust;
use Microsoft\Graph\Generated\Models\InboundOutboundPolicyConfiguration;
use Microsoft\Graph\Generated\Models\TemplateApplicationLevel;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new MultiTenantOrganizationPartnerConfigurationTemplate();
$inboundTrust = new CrossTenantAccessPolicyInboundTrust();
$inboundTrust->setIsMfaAccepted(true);
$inboundTrust->setIsCompliantDeviceAccepted(true);
$inboundTrust->setIsHybridAzureADJoinedDeviceAccepted(true);
$requestBody->setInboundTrust($inboundTrust);
$automaticUserConsentSettings = new InboundOutboundPolicyConfiguration();
$automaticUserConsentSettings->setInboundAllowed(true);
$automaticUserConsentSettings->setOutboundAllowed(true);
$requestBody->setAutomaticUserConsentSettings($automaticUserConsentSettings);
$requestBody->setTemplateApplicationLevel(new TemplateApplicationLevel('newPartners,existingPartners'));
$result = $graphServiceClient->policies()->crossTenantAccessPolicy()->templates()->multiTenantOrganizationPartnerConfiguration()->patch($requestBody)->wait();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
Import-Module Microsoft.Graph.Identity.SignIns
$params = @{
inboundTrust = @{
isMfaAccepted = $true
isCompliantDeviceAccepted = $true
isHybridAzureADJoinedDeviceAccepted = $true
}
automaticUserConsentSettings = @{
inboundAllowed = $true
outboundAllowed = $true
}
templateApplicationLevel = "newPartners,existingPartners"
}
Update-MgPolicyCrossTenantAccessPolicyTemplateMultiTenantOrganizationPartnerConfiguration -BodyParameter $params
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.multi_tenant_organization_partner_configuration_template import MultiTenantOrganizationPartnerConfigurationTemplate
from msgraph.generated.models.cross_tenant_access_policy_inbound_trust import CrossTenantAccessPolicyInboundTrust
from msgraph.generated.models.inbound_outbound_policy_configuration import InboundOutboundPolicyConfiguration
from msgraph.generated.models.template_application_level import TemplateApplicationLevel
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = MultiTenantOrganizationPartnerConfigurationTemplate(
inbound_trust = CrossTenantAccessPolicyInboundTrust(
is_mfa_accepted = True,
is_compliant_device_accepted = True,
is_hybrid_azure_a_d_joined_device_accepted = True,
),
automatic_user_consent_settings = InboundOutboundPolicyConfiguration(
inbound_allowed = True,
outbound_allowed = True,
),
template_application_level = TemplateApplicationLevel.NewPartners | TemplateApplicationLevel.ExistingPartners,
)
result = await graph_client.policies.cross_tenant_access_policy.templates.multi_tenant_organization_partner_configuration.patch(request_body)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
応答
HTTP/1.1 204 No Content