// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new Organization
{
OdataType = "#microsoft.graph.organization",
MobileDeviceManagementAuthority = MdmAuthority.Intune,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Organization["{organization-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.NewOrganization()
mobileDeviceManagementAuthority := graphmodels.INTUNE_MDMAUTHORITY
requestBody.SetMobileDeviceManagementAuthority(&mobileDeviceManagementAuthority)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
organization, err := graphClient.Organization().ByOrganizationId("organization-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);
Organization organization = new Organization();
organization.setOdataType("#microsoft.graph.organization");
organization.setMobileDeviceManagementAuthority(MdmAuthority.Intune);
Organization result = graphClient.organization().byOrganizationId("{organization-id}").patch(organization);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\Organization;
use Microsoft\Graph\Generated\Models\MdmAuthority;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Organization();
$requestBody->setOdataType('#microsoft.graph.organization');
$requestBody->setMobileDeviceManagementAuthority(new MdmAuthority('intune'));
$result = $graphServiceClient->organization()->byOrganizationId('organization-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.organization import Organization
from msgraph.generated.models.mdm_authority import MdmAuthority
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Organization(
odata_type = "#microsoft.graph.organization",
mobile_device_management_authority = MdmAuthority.Intune,
)
result = await graph_client.organization.by_organization_id('organization-id').patch(request_body)
Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.