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.
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.
Specifies a list ordered by priority on how Cloud PCs join Microsoft Entra ID.
enableSingleSignOn
Boolean
True if the provisioned Cloud PC can be accessed by single sign-on. False indicates that the provisioned Cloud PC doesn't support this feature. Default value is false. Windows 365 users can use single sign-on to authenticate to Microsoft Entra ID with passwordless options (for example, FIDO keys) to access their Cloud PC. Optional.
imageDisplayName
String
The display name for the OS image you're provisioning.
imageId
String
The ID of the OS image you want to provision on Cloud PCs. The format for a gallery type image is: {publisher_offer_sku}. Supported values for each of the parameters are as follows:
publisher: Microsoftwindowsdesktop.
offer: windows-ent-cpc.
sku: 21h1-ent-cpc-m365, 21h1-ent-cpc-os, 20h2-ent-cpc-m365, 20h2-ent-cpc-os, 20h1-ent-cpc-m365, 20h1-ent-cpc-os, 19h2-ent-cpc-m365 and 19h2-ent-cpc-os.
imageType
cloudPcProvisioningPolicyImageType
The type of OS image (custom or gallery) you want to provision on Cloud PCs. Possible values are: gallery, custom.
Specifies how Cloud PCs join Microsoft Entra ID. The domainJoinConfiguration property is deprecated and will stop returning data on May 31, 2024. Going forward, use the domainJoinConfigurations property.
onPremisesConnectionId (deprecated)
String
The ID of the cloudPcOnPremisesConnection. To ensure that Cloud PCs have network connectivity and that they domain join, choose a connection with a virtual network that’s validated by the Cloud PC service. The onPremisesConnectionId property is deprecated and will stop returning data on May 31, 2024. Going forward, use the domainJoinConfigurations property.
Specific Windows settings to configure during the creation of Cloud PCs for this provisioning policy. Supports $select. The windowsSettings property is deprecated and will stop returning data on January 31, 2024. Going forward, use the windowsSetting property.
Response
If successful, this method returns a 204 No Content response code.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new CloudPcProvisioningPolicy
{
OdataType = "#microsoft.graph.cloudPcProvisioningPolicy",
DisplayName = "HR provisioning policy",
Description = "Provisioning policy for India HR employees",
OnPremisesConnectionId = "4e47d0f6-6f77-44f0-8893-c0fe1701ffff",
ImageId = "Image ID value",
ImageDisplayName = "Image Display Name value",
ImageType = CloudPcProvisioningPolicyImageType.Custom,
WindowsSettings = new CloudPcWindowsSettings
{
Language = "en-US",
},
WindowsSetting = new CloudPcWindowsSetting
{
Locale = "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.ProvisioningPolicies["{cloudPcProvisioningPolicy-id}"].PatchAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta device-management virtual-endpoint provisioning-policies patch --cloud-pc-provisioning-policy-id {cloudPcProvisioningPolicy-id} --body '{\
"@odata.type": "#microsoft.graph.cloudPcProvisioningPolicy",\
"displayName": "HR provisioning policy",\
"description": "Provisioning policy for India HR employees",\
"onPremisesConnectionId": "4e47d0f6-6f77-44f0-8893-c0fe1701ffff",\
"imageId": "Image ID value",\
"imageDisplayName": "Image Display Name value",\
"imageType": "custom",\
"windowsSettings": {\
"language": "en-US"\
},\
"windowsSetting": {\
"locale": "en-US"\
}\
}\
'
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
CloudPcProvisioningPolicy cloudPcProvisioningPolicy = new CloudPcProvisioningPolicy();
cloudPcProvisioningPolicy.setOdataType("#microsoft.graph.cloudPcProvisioningPolicy");
cloudPcProvisioningPolicy.setDisplayName("HR provisioning policy");
cloudPcProvisioningPolicy.setDescription("Provisioning policy for India HR employees");
cloudPcProvisioningPolicy.setOnPremisesConnectionId("4e47d0f6-6f77-44f0-8893-c0fe1701ffff");
cloudPcProvisioningPolicy.setImageId("Image ID value");
cloudPcProvisioningPolicy.setImageDisplayName("Image Display Name value");
cloudPcProvisioningPolicy.setImageType(CloudPcProvisioningPolicyImageType.Custom);
CloudPcWindowsSettings windowsSettings = new CloudPcWindowsSettings();
windowsSettings.setLanguage("en-US");
cloudPcProvisioningPolicy.setWindowsSettings(windowsSettings);
CloudPcWindowsSetting windowsSetting = new CloudPcWindowsSetting();
windowsSetting.setLocale("en-US");
cloudPcProvisioningPolicy.setWindowsSetting(windowsSetting);
CloudPcProvisioningPolicy result = graphClient.deviceManagement().virtualEndpoint().provisioningPolicies().byCloudPcProvisioningPolicyId("{cloudPcProvisioningPolicy-id}").patch(cloudPcProvisioningPolicy);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\CloudPcProvisioningPolicy;
use Microsoft\Graph\Generated\Models\CloudPcWindowsSettings;
use Microsoft\Graph\Generated\Models\CloudPcWindowsSetting;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new CloudPcProvisioningPolicy();
$requestBody->setOdataType('#microsoft.graph.cloudPcProvisioningPolicy');
$requestBody->setDisplayName('HR provisioning policy');
$requestBody->setDescription('Provisioning policy for India HR employees');
$requestBody->setOnPremisesConnectionId('4e47d0f6-6f77-44f0-8893-c0fe1701ffff');
$requestBody->setImageId('Image ID value');
$requestBody->setImageDisplayName('Image Display Name value');
$requestBody->setImageType(new CloudPcProvisioningPolicyImageType('custom'));
$windowsSettings = new CloudPcWindowsSettings();
$windowsSettings->setLanguage('en-US');
$requestBody->setWindowsSettings($windowsSettings);
$windowsSetting = new CloudPcWindowsSetting();
$windowsSetting->setLocale('en-US');
$requestBody->setWindowsSetting($windowsSetting);
$result = $graphServiceClient->deviceManagement()->virtualEndpoint()->provisioningPolicies()->byCloudPcProvisioningPolicyId('cloudPcProvisioningPolicy-id')->patch($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
from msgraph import GraphServiceClient
from msgraph.generated.models.cloud_pc_provisioning_policy import CloudPcProvisioningPolicy
from msgraph.generated.models.cloud_pc_windows_settings import CloudPcWindowsSettings
from msgraph.generated.models.cloud_pc_windows_setting import CloudPcWindowsSetting
graph_client = GraphServiceClient(credentials, scopes)
request_body = CloudPcProvisioningPolicy(
odata_type = "#microsoft.graph.cloudPcProvisioningPolicy",
display_name = "HR provisioning policy",
description = "Provisioning policy for India HR employees",
on_premises_connection_id = "4e47d0f6-6f77-44f0-8893-c0fe1701ffff",
image_id = "Image ID value",
image_display_name = "Image Display Name value",
image_type = CloudPcProvisioningPolicyImageType.Custom,
windows_settings = CloudPcWindowsSettings(
language = "en-US",
),
windows_setting = CloudPcWindowsSetting(
locale = "en-US",
),
)
result = await graph_client.device_management.virtual_endpoint.provisioning_policies.by_cloud_pc_provisioning_policy_id('cloudPcProvisioningPolicy-id').patch(request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.