// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new Domain
{
IsDefault = true,
SupportedServices = new List<string>
{
"Email",
"OfficeCommunicationsOnline",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Domains["{domain-id}"].PatchAsync(requestBody);
// 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.NewDomain()
isDefault := true
requestBody.SetIsDefault(&isDefault)
supportedServices := []string {
"Email",
"OfficeCommunicationsOnline",
}
requestBody.SetSupportedServices(supportedServices)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
domains, err := graphClient.Domains().ByDomainId("domain-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);
Domain domain = new Domain();
domain.setIsDefault(true);
LinkedList<String> supportedServices = new LinkedList<String>();
supportedServices.add("Email");
supportedServices.add("OfficeCommunicationsOnline");
domain.setSupportedServices(supportedServices);
Domain result = graphClient.domains().byDomainId("{domain-id}").patch(domain);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.domain import Domain
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Domain(
is_default = True,
supported_services = [
"Email",
"OfficeCommunicationsOnline",
],
)
result = await graph_client.domains.by_domain_id('domain-id').patch(request_body)