Namespace: microsoft.graph.managedTenants
Important
APIs under the /beta
version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Update the properties of a tenantCustomizedInformation object.
This API is available in the following national cloud deployments.
Global service |
US Government L4 |
US Government L5 (DOD) |
China operated by 21Vianet |
✅ |
❌ |
❌ |
❌ |
Permissions
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type |
Least privileged permissions |
Higher privileged permissions |
Delegated (work or school account) |
ManagedTenants.ReadWrite.All |
Not available. |
Delegated (personal Microsoft account) |
Not supported. |
Not supported. |
Application |
Not supported. |
Not supported. |
HTTP request
PATCH /tenantRelationships/managedTenants/tenantsCustomizedInformation/{tenantCustomizedInformationId}
Request body
In the request body, supply a JSON representation of the tenantCustomizedInformation object.
The following table shows the properties that are required when you update the tenantCustomizedInformation.
Property |
Type |
Description |
id |
String |
The Microsoft Entra tenant identifier for the managed tenant. |
tenantId |
String |
The Microsoft Entra tenant identifier for the managed tenant. |
contacts |
microsoft.graph.managedTenants.tenantContactInformation collection |
The collection of contacts associated with the managed tenant. |
website |
String |
The website for the managed tenant. |
Response
If successful, this method returns a 200 OK
response code and an updated tenantCustomizedInformation object in the response body.
Examples
Request
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)
Response
Note: The response object shown here might be shortened for readability.
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"
}
]
}