PATCH https://graph.microsoft.com/v1.0/tenantRelationships/multiTenantOrganization
Content-Type: application/json
{
"displayName": "Contoso organization",
"description": "Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new MultiTenantOrganization
{
DisplayName = "Contoso organization",
Description = "Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.TenantRelationships.MultiTenantOrganization.PatchAsync(requestBody);
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
mgc tenant-relationships multi-tenant-organization patch --body '{\
"displayName": "Contoso organization",\
"description": "Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank"\
}\
'
有关如何将 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.NewMultiTenantOrganization()
displayName := "Contoso organization"
requestBody.SetDisplayName(&displayName)
description := "Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank"
requestBody.SetDescription(&description)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
multiTenantOrganization, err := graphClient.TenantRelationships().MultiTenantOrganization().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);
MultiTenantOrganization multiTenantOrganization = new MultiTenantOrganization();
multiTenantOrganization.setDisplayName("Contoso organization");
multiTenantOrganization.setDescription("Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank");
MultiTenantOrganization result = graphClient.tenantRelationships().multiTenantOrganization().patch(multiTenantOrganization);
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
const options = {
authProvider,
};
const client = Client.init(options);
const multiTenantOrganization = {
displayName: 'Contoso organization',
description: 'Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank'
};
await client.api('/tenantRelationships/multiTenantOrganization')
.update(multiTenantOrganization);
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\MultiTenantOrganization;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new MultiTenantOrganization();
$requestBody->setDisplayName('Contoso organization');
$requestBody->setDescription('Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank');
$result = $graphServiceClient->tenantRelationships()->multiTenantOrganization()->patch($requestBody)->wait();
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
Import-Module Microsoft.Graph.Identity.SignIns
$params = @{
displayName = "Contoso organization"
description = "Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank"
}
Update-MgTenantRelationshipMultiTenantOrganization -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 import MultiTenantOrganization
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = MultiTenantOrganization(
display_name = "Contoso organization",
description = "Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank",
)
result = await graph_client.tenant_relationships.multi_tenant_organization.patch(request_body)
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。