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.
The collection of Cloud PC user setting resources each to be assigned to the corresponding target group. Only Microsoft 365 groups and security groups in Azure AD are currently supported.
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
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.UserSettings.Item.Assign.AssignPostRequestBody
{
Assignments = new List<CloudPcUserSettingAssignment>
{
new CloudPcUserSettingAssignment
{
Id = "b0c2d35f-3385-46c8-a6f5-6c3dfad7708b_64ff06de-9c00-4a5a-98b5-7f5abe26ffff",
Target = new CloudPcManagementAssignmentTarget
{
OdataType = "microsoft.graph.cloudPcManagementGroupAssignmentTarget",
AdditionalData = new Dictionary<string, object>
{
{
"groupId" , "64ff06de-9c00-4a5a-98b5-7f5abe26ffff"
},
},
},
},
},
};
await graphClient.DeviceManagement.VirtualEndpoint.UserSettings["{cloudPcUserSetting-id}"].Assign.PostAsync(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.
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.
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
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new AssignPostRequestBody();
$assignmentsCloudPcUserSettingAssignment1 = new CloudPcUserSettingAssignment();
$assignmentsCloudPcUserSettingAssignment1->setId('b0c2d35f-3385-46c8-a6f5-6c3dfad7708b_64ff06de-9c00-4a5a-98b5-7f5abe26ffff');
$assignmentsCloudPcUserSettingAssignment1Target = new CloudPcManagementAssignmentTarget();
$assignmentsCloudPcUserSettingAssignment1Target->set@odatatype('microsoft.graph.cloudPcManagementGroupAssignmentTarget');
$additionalData = [
'groupId' => '64ff06de-9c00-4a5a-98b5-7f5abe26ffff',
];
$assignmentsCloudPcUserSettingAssignment1Target->setAdditionalData($additionalData);
$assignmentsCloudPcUserSettingAssignment1->setTarget($assignmentsCloudPcUserSettingAssignment1Target);
$assignmentsArray []= $assignmentsCloudPcUserSettingAssignment1;
$requestBody->setAssignments($assignmentsArray);
$graphServiceClient->deviceManagement()->virtualEndpoint()->userSettings()->byUserSettingId('cloudPcUserSetting-id')->assign()->post($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.
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.