// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new CloudPcOrganizationSettings
{
OdataType = "#microsoft.graph.cloudPcOrganizationSettings",
EnableMEMAutoEnroll = true,
OsVersion = CloudPcOperatingSystem.Windows11,
UserAccountType = CloudPcUserAccountType.StandardUser,
WindowsSettings = new CloudPcWindowsSettings
{
Language = "en-US",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.VirtualEndpoint.OrganizationSettings.PatchAsync(requestBody);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta device-management virtual-endpoint organization-settings patch --body '{\
"@odata.type": "#microsoft.graph.cloudPcOrganizationSettings",\
"enableMEMAutoEnroll": true,\
"osVersion": "windows11",\
"userAccountType": "standardUser",\
"windowsSettings": {\
"language": "en-US"\
}\
}\
'
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
CloudPcOrganizationSettings cloudPcOrganizationSettings = new CloudPcOrganizationSettings();
cloudPcOrganizationSettings.setOdataType("#microsoft.graph.cloudPcOrganizationSettings");
cloudPcOrganizationSettings.setEnableMEMAutoEnroll(true);
cloudPcOrganizationSettings.setOsVersion(CloudPcOperatingSystem.Windows11);
cloudPcOrganizationSettings.setUserAccountType(CloudPcUserAccountType.StandardUser);
CloudPcWindowsSettings windowsSettings = new CloudPcWindowsSettings();
windowsSettings.setLanguage("en-US");
cloudPcOrganizationSettings.setWindowsSettings(windowsSettings);
CloudPcOrganizationSettings result = graphClient.deviceManagement().virtualEndpoint().organizationSettings().patch(cloudPcOrganizationSettings);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\CloudPcOrganizationSettings;
use Microsoft\Graph\Generated\Models\CloudPcWindowsSettings;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new CloudPcOrganizationSettings();
$requestBody->setOdataType('#microsoft.graph.cloudPcOrganizationSettings');
$requestBody->setEnableMEMAutoEnroll(true);
$requestBody->setOsVersion(new CloudPcOperatingSystem('windows11'));
$requestBody->setUserAccountType(new CloudPcUserAccountType('standardUser'));
$windowsSettings = new CloudPcWindowsSettings();
$windowsSettings->setLanguage('en-US');
$requestBody->setWindowsSettings($windowsSettings);
$result = $graphServiceClient->deviceManagement()->virtualEndpoint()->organizationSettings()->patch($requestBody)->wait();
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
from msgraph import GraphServiceClient
from msgraph.generated.models.cloud_pc_organization_settings import CloudPcOrganizationSettings
from msgraph.generated.models.cloud_pc_windows_settings import CloudPcWindowsSettings
graph_client = GraphServiceClient(credentials, scopes)
request_body = CloudPcOrganizationSettings(
odata_type = "#microsoft.graph.cloudPcOrganizationSettings",
enable_m_e_m_auto_enroll = True,
os_version = CloudPcOperatingSystem.Windows11,
user_account_type = CloudPcUserAccountType.StandardUser,
windows_settings = CloudPcWindowsSettings(
language = "en-US",
),
)
result = await graph_client.device_management.virtual_endpoint.organization_settings.patch(request_body)
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。