Namespace: microsoft.graph.managedTenants
Wichtig
Die APIs unter der /beta Version in Microsoft Graph können sich ändern. Die Verwendung dieser APIs in Produktionsanwendungen wird nicht unterstützt. Um festzustellen, ob eine API in v1.0 verfügbar ist, verwenden Sie die Version Selektor.
Aktualisieren sie die Eigenschaften eines tenantCustomizedInformation-Objekts .
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) |
ManagedTenants.ReadWrite.All |
Nicht verfügbar. |
| Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Nicht unterstützt |
| Application |
Nicht unterstützt |
Nicht unterstützt |
HTTP-Anforderung
PATCH /tenantRelationships/managedTenants/tenantsCustomizedInformation/{tenantCustomizedInformationId}
Anforderungstext
Geben Sie im Anforderungstext eine JSON-Darstellung des TenantCustomizedInformation-Objekts an.
In der folgenden Tabelle sind die Eigenschaften aufgeführt, die erforderlich sind, wenn Sie tenantCustomizedInformation aktualisieren.
Antwort
Bei erfolgreicher Ausführung gibt die Methode den 200 OK Antwortcode und ein aktualisiertes Objekt tenantCustomizedInformation im Antworttext zurück.
Beispiele
Anforderung
PATCH https://graph.microsoft.com/beta/tenantRelationships/managedTenants/tenantsCustomizedInformation/{tenantCustomizedInformationId}
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.managedTenants.tenantCustomizedInformation",
"tenantId": "String",
"contacts": [
{
"@odata.type": "microsoft.graph.managedTenants.tenantContactInformation",
"name": "String",
"title": "String",
"email": "String",
"phone": "String",
"notes": "String"
}
],
"website": "String"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models.ManagedTenants;
var requestBody = new TenantCustomizedInformation
{
OdataType = "#microsoft.graph.managedTenants.tenantCustomizedInformation",
TenantId = "String",
Contacts = new List<TenantContactInformation>
{
new TenantContactInformation
{
OdataType = "microsoft.graph.managedTenants.tenantContactInformation",
Name = "String",
Title = "String",
Email = "String",
Phone = "String",
Notes = "String",
},
},
Website = "String",
};
// To initialize your graphClient, see https://v4.hkg1.meaqua.org/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.TenantRelationships.ManagedTenants.TenantsCustomizedInformation["{tenantCustomizedInformation-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodelsmanagedtenants "github.com/microsoftgraph/msgraph-beta-sdk-go/models/managedtenants"
//other-imports
)
requestBody := graphmodelsmanagedtenants.NewTenantCustomizedInformation()
tenantId := "String"
requestBody.SetTenantId(&tenantId)
tenantContactInformation := graphmodelsmanagedtenants.NewTenantContactInformation()
name := "String"
tenantContactInformation.SetName(&name)
title := "String"
tenantContactInformation.SetTitle(&title)
email := "String"
tenantContactInformation.SetEmail(&email)
phone := "String"
tenantContactInformation.SetPhone(&phone)
notes := "String"
tenantContactInformation.SetNotes(¬es)
contacts := []graphmodelsmanagedtenants.TenantContactInformationable {
tenantContactInformation,
}
requestBody.SetContacts(contacts)
website := "String"
requestBody.SetWebsite(&website)
// To initialize your graphClient, see https://v4.hkg1.meaqua.org/en-us/graph/sdks/create-client?from=snippets&tabs=go
tenantsCustomizedInformation, err := graphClient.TenantRelationships().ManagedTenants().TenantsCustomizedInformation().ByTenantCustomizedInformationId("tenantCustomizedInformation-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.models.managedtenants.TenantCustomizedInformation tenantCustomizedInformation = new com.microsoft.graph.beta.models.managedtenants.TenantCustomizedInformation();
tenantCustomizedInformation.setOdataType("#microsoft.graph.managedTenants.tenantCustomizedInformation");
tenantCustomizedInformation.setTenantId("String");
LinkedList<com.microsoft.graph.beta.models.managedtenants.TenantContactInformation> contacts = new LinkedList<com.microsoft.graph.beta.models.managedtenants.TenantContactInformation>();
com.microsoft.graph.beta.models.managedtenants.TenantContactInformation tenantContactInformation = new com.microsoft.graph.beta.models.managedtenants.TenantContactInformation();
tenantContactInformation.setOdataType("microsoft.graph.managedTenants.tenantContactInformation");
tenantContactInformation.setName("String");
tenantContactInformation.setTitle("String");
tenantContactInformation.setEmail("String");
tenantContactInformation.setPhone("String");
tenantContactInformation.setNotes("String");
contacts.add(tenantContactInformation);
tenantCustomizedInformation.setContacts(contacts);
tenantCustomizedInformation.setWebsite("String");
com.microsoft.graph.models.managedtenants.TenantCustomizedInformation result = graphClient.tenantRelationships().managedTenants().tenantsCustomizedInformation().byTenantCustomizedInformationId("{tenantCustomizedInformation-id}").patch(tenantCustomizedInformation);
const options = {
authProvider,
};
const client = Client.init(options);
const tenantCustomizedInformation = {
'@odata.type': '#microsoft.graph.managedTenants.tenantCustomizedInformation',
tenantId: 'String',
contacts: [
{
'@odata.type': 'microsoft.graph.managedTenants.tenantContactInformation',
name: 'String',
title: 'String',
email: 'String',
phone: 'String',
notes: 'String'
}
],
website: 'String'
};
await client.api('/tenantRelationships/managedTenants/tenantsCustomizedInformation/{tenantCustomizedInformationId}')
.version('beta')
.update(tenantCustomizedInformation);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\ManagedTenants\TenantCustomizedInformation;
use Microsoft\Graph\Beta\Generated\Models\ManagedTenants\TenantContactInformation;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new TenantCustomizedInformation();
$requestBody->setOdataType('#microsoft.graph.managedTenants.tenantCustomizedInformation');
$requestBody->setTenantId('String');
$contactsTenantContactInformation1 = new TenantContactInformation();
$contactsTenantContactInformation1->setOdataType('microsoft.graph.managedTenants.tenantContactInformation');
$contactsTenantContactInformation1->setName('String');
$contactsTenantContactInformation1->setTitle('String');
$contactsTenantContactInformation1->setEmail('String');
$contactsTenantContactInformation1->setPhone('String');
$contactsTenantContactInformation1->setNotes('String');
$contactsArray []= $contactsTenantContactInformation1;
$requestBody->setContacts($contactsArray);
$requestBody->setWebsite('String');
$result = $graphServiceClient->tenantRelationships()->managedTenants()->tenantsCustomizedInformation()->byTenantCustomizedInformationId('tenantCustomizedInformation-id')->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.ManagedTenants
$params = @{
"@odata.type" = "#microsoft.graph.managedTenants.tenantCustomizedInformation"
tenantId = "String"
contacts = @(
@{
"@odata.type" = "microsoft.graph.managedTenants.tenantContactInformation"
name = "String"
title = "String"
email = "String"
phone = "String"
notes = "String"
}
)
website = "String"
}
Update-MgBetaTenantRelationshipManagedTenantCustomizedInformation -TenantCustomizedInformationId $tenantCustomizedInformationId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.managed_tenants.tenant_customized_information import TenantCustomizedInformation
from msgraph_beta.generated.models.managed_tenants.tenant_contact_information import TenantContactInformation
# To initialize your graph_client, see https://v4.hkg1.meaqua.org/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = TenantCustomizedInformation(
odata_type = "#microsoft.graph.managedTenants.tenantCustomizedInformation",
tenant_id = "String",
contacts = [
TenantContactInformation(
odata_type = "microsoft.graph.managedTenants.tenantContactInformation",
name = "String",
title = "String",
email = "String",
phone = "String",
notes = "String",
),
],
website = "String",
)
result = await graph_client.tenant_relationships.managed_tenants.tenants_customized_information.by_tenant_customized_information_id('tenantCustomizedInformation-id').patch(request_body)
Antwort
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.managedTenants.tenantCustomizedInformation",
"id": "34298981-4fc8-4974-9486-c8909ed1521b",
"tenantId": "34298981-4fc8-4974-9486-c8909ed1521b",
"website": "https://www.fourthcoffee.com",
"contacts": [
{
"name": "Sally",
"email": "sally@fourthcoffee.com",
"phone": "5558009731"
},
{
"name": "Hector",
"email": "hector@fourthcoffee.com",
"phone": "5558009732"
}
]
}