// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new EditionUpgradeConfiguration
{
OdataType = "#microsoft.graph.editionUpgradeConfiguration",
Description = "Description value",
DisplayName = "Display Name value",
Version = 7,
LicenseType = EditionUpgradeLicenseType.LicenseFile,
TargetEdition = Windows10EditionType.Windows10EnterpriseN,
License = "License value",
ProductKey = "Product Key value",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.DeviceConfigurations.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EditionUpgradeConfiguration deviceConfiguration = new EditionUpgradeConfiguration();
deviceConfiguration.setOdataType("#microsoft.graph.editionUpgradeConfiguration");
deviceConfiguration.setDescription("Description value");
deviceConfiguration.setDisplayName("Display Name value");
deviceConfiguration.setVersion(7);
deviceConfiguration.setLicenseType(EditionUpgradeLicenseType.LicenseFile);
deviceConfiguration.setTargetEdition(Windows10EditionType.Windows10EnterpriseN);
deviceConfiguration.setLicense("License value");
deviceConfiguration.setProductKey("Product Key value");
DeviceConfiguration result = graphClient.deviceManagement().deviceConfigurations().post(deviceConfiguration);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.edition_upgrade_configuration import EditionUpgradeConfiguration
from msgraph.generated.models.edition_upgrade_license_type import EditionUpgradeLicenseType
from msgraph.generated.models.windows10_edition_type import Windows10EditionType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = EditionUpgradeConfiguration(
odata_type = "#microsoft.graph.editionUpgradeConfiguration",
description = "Description value",
display_name = "Display Name value",
version = 7,
license_type = EditionUpgradeLicenseType.LicenseFile,
target_edition = Windows10EditionType.Windows10EnterpriseN,
license = "License value",
product_key = "Product Key value",
)
result = await graph_client.device_management.device_configurations.post(request_body)