Espace de noms : microsoft.graph.managedTenants
Importante
Les API sous la version /beta
dans Microsoft Graph sont susceptibles d’être modifiées. L’utilisation de ces API dans des applications de production n’est pas prise en charge. Pour déterminer si une API est disponible dans v1.0, utilisez le sélecteur Version .
Mettez à jour les propriétés d’un objet tenantCustomizedInformation .
Cette API est disponible dans les déploiements de cloud national suivants.
Service global |
Gouvernement des États-Unis L4 |
Us Government L5 (DOD) |
Chine gérée par 21Vianet |
✅ |
❌ |
❌ |
❌ |
Autorisations
Choisissez l’autorisation ou les autorisations marquées comme moins privilégiées pour cette API. Utilisez une autorisation ou des autorisations privilégiées plus élevées uniquement si votre application en a besoin. Pour plus d’informations sur les autorisations déléguées et d’application, consultez Types d’autorisations. Pour en savoir plus sur ces autorisations, consultez les informations de référence sur les autorisations.
Type d’autorisation |
Autorisations avec privilèges minimum |
Autorisations privilégiées plus élevées |
Déléguée (compte professionnel ou scolaire) |
ManagedTenants.ReadWrite.All |
Non disponible. |
Déléguée (compte Microsoft personnel) |
Non prise en charge. |
Non prise en charge. |
Application |
Non prise en charge. |
Non prise en charge. |
Requête HTTP
PATCH /tenantRelationships/managedTenants/tenantsCustomizedInformation/{tenantCustomizedInformationId}
Corps de la demande
Dans le corps de la demande, fournissez une représentation JSON de l’objet tenantCustomizedInformation .
Le tableau suivant présente les propriétés requises lorsque vous mettez à jour tenantCustomizedInformation.
Réponse
Si elle réussit, cette méthode renvoie un 200 OK
code de réponse et un objet tenantCustomizedInformation mis à jour dans le corps de la réponse.
Exemples
Demande
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://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.TenantRelationships.ManagedTenants.TenantsCustomizedInformation["{tenantCustomizedInformation-id}"].PatchAsync(requestBody);
mgc-beta tenant-relationships managed-tenants tenants-customized-information patch --tenant-customized-information-id {tenantCustomizedInformation-id} --body '{\
"@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 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://learn.microsoft.com/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://learn.microsoft.com/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)
Réponse
Remarque : l’objet de réponse affiché ci-après peut être raccourci pour plus de lisibilité.
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"
}
]
}