Priority is used when a user exists in multiple groups that are assigned enrollment configuration. Users are subject only to the configuration with the lowest priority value. Inherited from deviceEnrollmentConfiguration
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new DeviceEnrollmentLimitConfiguration
{
OdataType = "#microsoft.graph.deviceEnrollmentLimitConfiguration",
DisplayName = "Display Name value",
Description = "Description value",
Priority = 8,
Version = 7,
Limit = 5,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.DeviceEnrollmentConfigurations.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewDeviceEnrollmentConfiguration()
displayName := "Display Name value"
requestBody.SetDisplayName(&displayName)
description := "Description value"
requestBody.SetDescription(&description)
priority := int32(8)
requestBody.SetPriority(&priority)
version := int32(7)
requestBody.SetVersion(&version)
limit := int32(5)
requestBody.SetLimit(&limit)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
deviceEnrollmentConfigurations, err := graphClient.DeviceManagement().DeviceEnrollmentConfigurations().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
DeviceEnrollmentLimitConfiguration deviceEnrollmentConfiguration = new DeviceEnrollmentLimitConfiguration();
deviceEnrollmentConfiguration.setOdataType("#microsoft.graph.deviceEnrollmentLimitConfiguration");
deviceEnrollmentConfiguration.setDisplayName("Display Name value");
deviceEnrollmentConfiguration.setDescription("Description value");
deviceEnrollmentConfiguration.setPriority(8);
deviceEnrollmentConfiguration.setVersion(7);
deviceEnrollmentConfiguration.setLimit(5);
DeviceEnrollmentConfiguration result = graphClient.deviceManagement().deviceEnrollmentConfigurations().post(deviceEnrollmentConfiguration);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.device_enrollment_limit_configuration import DeviceEnrollmentLimitConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = DeviceEnrollmentLimitConfiguration(
odata_type = "#microsoft.graph.deviceEnrollmentLimitConfiguration",
display_name = "Display Name value",
description = "Description value",
priority = 8,
version = 7,
limit = 5,
)
result = await graph_client.device_management.device_enrollment_configurations.post(request_body)
Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.