| title | Create cloudPcProvisioningPolicy |
|---|---|
| description | Create a new Cloud PC provisioning policy. |
| author | AshleyYangSZ |
| ms.localizationpriority | medium |
| ms.subservice | cloud-pc |
| doc_type | apiPageType |
| ms.date | 08/19/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Create a new cloudPcProvisioningPolicy object.
[!INCLUDE national-cloud-support]
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.
[!INCLUDE permissions-table]
POST /deviceManagement/virtualEndpoint/provisioningPolicies| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json. Required. |
In the request body, supply a JSON representation of the cloudPcProvisioningPolicy object.
The following table lists the properties that are required when you create the cloudPcProvisioningPolicy.
| Property | Type | Description |
|---|---|---|
| description | String | The provisioning policy description. |
| displayName | String | The display name for the provisioning policy. |
| domainJoinConfigurations | cloudPcDomainJoinConfiguration collection | Specifies a list ordered by priority on how Cloud PCs join Microsoft Entra ID. |
| imageDisplayName | String | The display name for the OS image you’re provisioning. |
| imageId | String | The ID of the operating system 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:
|
| imageType | cloudPcProvisioningPolicyImageType | The type of OS image (custom or gallery) you want to provision on Cloud PCs. The possible values are: gallery, custom. |
| provisioningType | cloudPcProvisioningType | Specifies the type of license used when provisioning Cloud PCs using this policy. By default, the license type is dedicated if the provisioningType isn't specified when you create the cloudPcProvisioningPolicy. You can't change this property after the cloudPcProvisioningPolicy was created. The possible values are: dedicated, shared, unknownFutureValue, sharedByUser, sharedByEntraGroup. Use the Prefer: include-unknown-enum-members request header to get the following values from this evolvable enum: sharedByUser, sharedByEntraGroup. The shared member is deprecated and will stop returning on April 30, 2027; going forward, use the sharedByUser member. |
| userSettingsPersistenceConfiguration | cloudPcUserSettingsPersistenceConfiguration | Indicates specific settings that enable the persistence of user application settings between Cloud PC sessions. The default value is null. This feature is only available for Cloud PC provisioning policies of type sharedByEntraGroup. Supports $select. Optional |
| windowsSetting | cloudPcWindowsSettings | Indicates a specific Windows setting to configure during the creation of Cloud PCs for this provisioning policy. Supports $select. |
| domainJoinConfiguration (deprecated) | cloudPcDomainJoinConfiguration | 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 the Cloud PC service validated it. The onPremisesConnectionId property is deprecated and will stop returning data on May 31, 2024. Going forward, use the domainJoinConfigurations property. |
| windowsSettings (deprecated) | cloudPcWindowsSettings | 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. |
If successful, this method returns a 201 Created response code and a cloudPcProvisioningPolicy object in the response body.
The following example shows a request.
POST https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/provisioningPolicies
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.cloudPcProvisioningPolicy",
"description": "Description value",
"displayName": "Display Name value",
"domainJoinConfiguration": {
"domainJoinType": "hybridAzureADJoin",
"onPremisesConnectionId": "16ee6c71-fc10-438b-88ac-daa1ccafffff"
},
"domainJoinConfigurations": [
{
"onPremisesConnectionId": "16ee6c71-fc10-438b-88ac-daa1ccafffff",
"type": "hybridAzureADJoin"
},
{
"onPremisesConnectionId": "26e16c71-f210-438b-88ac-d481ccafffff",
"type": "hybridAzureADJoin"
}
],
"id": "1d164206-bf41-4fd2-8424-a3192d39ffff",
"enableSingleSignOn": true,
"imageDisplayName": "Windows-10 19h1-evd",
"imageId": "MicrosoftWindowsDesktop_Windows-10_19h1-evd",
"imageType":"gallery",
"onPremisesConnectionId": "4e47d0f6-6f77-44f0-8893-c0fe1701ffff",
"windowsSettings": {
"language": "en-US"
},
"windowsSetting": {
"locale": "en-US"
},
"provisioningType": "dedicated",
"userExperienceType": "cloudPc",
"userSettingsPersistenceConfiguration": {
"userSettingsPersistenceEnabled": true,
"userSettingsPersistenceStorageSizeCategory": "fourGB"
}
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.cloudPcProvisioningPolicy",
"description": "Description value",
"displayName": "Display Name value",
"domainJoinConfiguration": {
"onPremisesConnectionId": "4e47d0f6-6f77-44f0-8893-c0fe1701ffff",
"type": "hybridAzureADJoin"
},
"domainJoinConfigurations": [
{
"onPremisesConnectionId": "16ee6c71-fc10-438b-88ac-daa1ccafffff",
"type": "hybridAzureADJoin"
},
{
"onPremisesConnectionId": "26e16c71-f210-438b-88ac-d481ccafffff",
"type": "hybridAzureADJoin"
}
],
"microsoftManagedDesktop": {
"managedType": "notManaged",
"profile": null
},
"autopatch": {
"autopatchGroupId": null
},
"autopilotConfiguration": null,
"enableSingleSignOn": true,
"id": "1d164206-bf41-4fd2-8424-a3192d39ffff",
"imageDisplayName": "Windows-10 19h1-evd",
"imageId": "MicrosoftWindowsDesktop_Windows-10_19h1-evd",
"imageType":"gallery",
"onPremisesConnectionId": "4e47d0f6-6f77-44f0-8893-c0fe1701ffff",
"windowsSettings": {
"language": "en-US"
},
"windowsSetting": {
"locale": "en-US"
},
"managedBy": "windows365",
"provisioningType": "dedicated",
"userSettingsPersistenceConfiguration": {
"userSettingsPersistenceEnabled": true,
"userSettingsPersistenceStorageSizeCategory": "fourGB"
}
}