// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesUnenrollAssetsById;
using Microsoft.Graph.Beta.Models.WindowsUpdates;
var requestBody = new UnenrollAssetsByIdPostRequestBody
{
UpdateCategory = UpdateCategory.Feature,
MemberEntityType = "#microsoft.graph.windowsUpdates.azureADDevice",
Ids = new List<string>
{
"String",
"String",
"String",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta admin windows updates updatable-assets microsoft-graph-windows-updates-unenroll-assets-by-id post --body '{\
"updateCategory": "feature",\
"memberEntityType": "#microsoft.graph.windowsUpdates.azureADDevice",\
"ids": [\
"String",\
"String",\
"String"\
]\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.admin.windows.updates.updatableassets.microsoftgraphwindowsupdatesunenrollassetsbyid.UnenrollAssetsByIdPostRequestBody unenrollAssetsByIdPostRequestBody = new com.microsoft.graph.beta.admin.windows.updates.updatableassets.microsoftgraphwindowsupdatesunenrollassetsbyid.UnenrollAssetsByIdPostRequestBody();
unenrollAssetsByIdPostRequestBody.setUpdateCategory(com.microsoft.graph.beta.models.windowsupdates.UpdateCategory.Feature);
unenrollAssetsByIdPostRequestBody.setMemberEntityType("#microsoft.graph.windowsUpdates.azureADDevice");
LinkedList<String> ids = new LinkedList<String>();
ids.add("String");
ids.add("String");
ids.add("String");
unenrollAssetsByIdPostRequestBody.setIds(ids);
graphClient.admin().windows().updates().updatableAssets().microsoftGraphWindowsUpdatesUnenrollAssetsById().post(unenrollAssetsByIdPostRequestBody);