POST https://graph.microsoft.com/v1.0/deviceManagement/deviceEnrollmentConfigurations
Content-type: application/json
Content-length: 629
{
"@odata.type": "#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration",
"displayName": "Display Name value",
"description": "Description value",
"priority": 8,
"version": 7,
"pinMinimumLength": 0,
"pinMaximumLength": 0,
"pinUppercaseCharactersUsage": "required",
"pinLowercaseCharactersUsage": "required",
"pinSpecialCharactersUsage": "required",
"state": "enabled",
"securityDeviceRequired": true,
"unlockWithBiometricsEnabled": true,
"remotePassportEnabled": true,
"pinPreviousBlockCount": 5,
"pinExpirationInDays": 3,
"enhancedBiometricsState": "enabled"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new DeviceEnrollmentWindowsHelloForBusinessConfiguration
{
OdataType = "#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration",
DisplayName = "Display Name value",
Description = "Description value",
Priority = 8,
Version = 7,
PinMinimumLength = 0,
PinMaximumLength = 0,
PinUppercaseCharactersUsage = WindowsHelloForBusinessPinUsage.Required,
PinLowercaseCharactersUsage = WindowsHelloForBusinessPinUsage.Required,
PinSpecialCharactersUsage = WindowsHelloForBusinessPinUsage.Required,
State = Enablement.Enabled,
SecurityDeviceRequired = true,
UnlockWithBiometricsEnabled = true,
RemotePassportEnabled = true,
PinPreviousBlockCount = 5,
PinExpirationInDays = 3,
EnhancedBiometricsState = Enablement.Enabled,
};
// 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);
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
mgc device-management device-enrollment-configurations create --body '{\
"@odata.type": "#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration",\
"displayName": "Display Name value",\
"description": "Description value",\
"priority": 8,\
"version": 7,\
"pinMinimumLength": 0,\
"pinMaximumLength": 0,\
"pinUppercaseCharactersUsage": "required",\
"pinLowercaseCharactersUsage": "required",\
"pinSpecialCharactersUsage": "required",\
"state": "enabled",\
"securityDeviceRequired": true,\
"unlockWithBiometricsEnabled": true,\
"remotePassportEnabled": true,\
"pinPreviousBlockCount": 5,\
"pinExpirationInDays": 3,\
"enhancedBiometricsState": "enabled"\
}\
'
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
// 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)
pinMinimumLength := int32(0)
requestBody.SetPinMinimumLength(&pinMinimumLength)
pinMaximumLength := int32(0)
requestBody.SetPinMaximumLength(&pinMaximumLength)
pinUppercaseCharactersUsage := graphmodels.REQUIRED_WINDOWSHELLOFORBUSINESSPINUSAGE
requestBody.SetPinUppercaseCharactersUsage(&pinUppercaseCharactersUsage)
pinLowercaseCharactersUsage := graphmodels.REQUIRED_WINDOWSHELLOFORBUSINESSPINUSAGE
requestBody.SetPinLowercaseCharactersUsage(&pinLowercaseCharactersUsage)
pinSpecialCharactersUsage := graphmodels.REQUIRED_WINDOWSHELLOFORBUSINESSPINUSAGE
requestBody.SetPinSpecialCharactersUsage(&pinSpecialCharactersUsage)
state := graphmodels.ENABLED_ENABLEMENT
requestBody.SetState(&state)
securityDeviceRequired := true
requestBody.SetSecurityDeviceRequired(&securityDeviceRequired)
unlockWithBiometricsEnabled := true
requestBody.SetUnlockWithBiometricsEnabled(&unlockWithBiometricsEnabled)
remotePassportEnabled := true
requestBody.SetRemotePassportEnabled(&remotePassportEnabled)
pinPreviousBlockCount := int32(5)
requestBody.SetPinPreviousBlockCount(&pinPreviousBlockCount)
pinExpirationInDays := int32(3)
requestBody.SetPinExpirationInDays(&pinExpirationInDays)
enhancedBiometricsState := graphmodels.ENABLED_ENABLEMENT
requestBody.SetEnhancedBiometricsState(&enhancedBiometricsState)
// 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)
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
DeviceEnrollmentWindowsHelloForBusinessConfiguration deviceEnrollmentConfiguration = new DeviceEnrollmentWindowsHelloForBusinessConfiguration();
deviceEnrollmentConfiguration.setOdataType("#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration");
deviceEnrollmentConfiguration.setDisplayName("Display Name value");
deviceEnrollmentConfiguration.setDescription("Description value");
deviceEnrollmentConfiguration.setPriority(8);
deviceEnrollmentConfiguration.setVersion(7);
deviceEnrollmentConfiguration.setPinMinimumLength(0);
deviceEnrollmentConfiguration.setPinMaximumLength(0);
deviceEnrollmentConfiguration.setPinUppercaseCharactersUsage(WindowsHelloForBusinessPinUsage.Required);
deviceEnrollmentConfiguration.setPinLowercaseCharactersUsage(WindowsHelloForBusinessPinUsage.Required);
deviceEnrollmentConfiguration.setPinSpecialCharactersUsage(WindowsHelloForBusinessPinUsage.Required);
deviceEnrollmentConfiguration.setState(Enablement.Enabled);
deviceEnrollmentConfiguration.setSecurityDeviceRequired(true);
deviceEnrollmentConfiguration.setUnlockWithBiometricsEnabled(true);
deviceEnrollmentConfiguration.setRemotePassportEnabled(true);
deviceEnrollmentConfiguration.setPinPreviousBlockCount(5);
deviceEnrollmentConfiguration.setPinExpirationInDays(3);
deviceEnrollmentConfiguration.setEnhancedBiometricsState(Enablement.Enabled);
DeviceEnrollmentConfiguration result = graphClient.deviceManagement().deviceEnrollmentConfigurations().post(deviceEnrollmentConfiguration);
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
const options = {
authProvider,
};
const client = Client.init(options);
const deviceEnrollmentConfiguration = {
'@odata.type': '#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration',
displayName: 'Display Name value',
description: 'Description value',
priority: 8,
version: 7,
pinMinimumLength: 0,
pinMaximumLength: 0,
pinUppercaseCharactersUsage: 'required',
pinLowercaseCharactersUsage: 'required',
pinSpecialCharactersUsage: 'required',
state: 'enabled',
securityDeviceRequired: true,
unlockWithBiometricsEnabled: true,
remotePassportEnabled: true,
pinPreviousBlockCount: 5,
pinExpirationInDays: 3,
enhancedBiometricsState: 'enabled'
};
await client.api('/deviceManagement/deviceEnrollmentConfigurations')
.post(deviceEnrollmentConfiguration);
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\DeviceEnrollmentWindowsHelloForBusinessConfiguration;
use Microsoft\Graph\Generated\Models\WindowsHelloForBusinessPinUsage;
use Microsoft\Graph\Generated\Models\Enablement;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new DeviceEnrollmentWindowsHelloForBusinessConfiguration();
$requestBody->setOdataType('#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration');
$requestBody->setDisplayName('Display Name value');
$requestBody->setDescription('Description value');
$requestBody->setPriority(8);
$requestBody->setVersion(7);
$requestBody->setPinMinimumLength(0);
$requestBody->setPinMaximumLength(0);
$requestBody->setPinUppercaseCharactersUsage(new WindowsHelloForBusinessPinUsage('required'));
$requestBody->setPinLowercaseCharactersUsage(new WindowsHelloForBusinessPinUsage('required'));
$requestBody->setPinSpecialCharactersUsage(new WindowsHelloForBusinessPinUsage('required'));
$requestBody->setState(new Enablement('enabled'));
$requestBody->setSecurityDeviceRequired(true);
$requestBody->setUnlockWithBiometricsEnabled(true);
$requestBody->setRemotePassportEnabled(true);
$requestBody->setPinPreviousBlockCount(5);
$requestBody->setPinExpirationInDays(3);
$requestBody->setEnhancedBiometricsState(new Enablement('enabled'));
$result = $graphServiceClient->deviceManagement()->deviceEnrollmentConfigurations()->post($requestBody)->wait();
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
Import-Module Microsoft.Graph.DeviceManagement.Enrollment
$params = @{
"@odata.type" = "#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration"
displayName = "Display Name value"
description = "Description value"
priority = 8
version = 7
pinMinimumLength =
pinMaximumLength =
pinUppercaseCharactersUsage = "required"
pinLowercaseCharactersUsage = "required"
pinSpecialCharactersUsage = "required"
state = "enabled"
securityDeviceRequired = $true
unlockWithBiometricsEnabled = $true
remotePassportEnabled = $true
pinPreviousBlockCount =
pinExpirationInDays =
enhancedBiometricsState = "enabled"
}
New-MgDeviceManagementDeviceEnrollmentConfiguration -BodyParameter $params
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.device_enrollment_windows_hello_for_business_configuration import DeviceEnrollmentWindowsHelloForBusinessConfiguration
from msgraph.generated.models.windows_hello_for_business_pin_usage import WindowsHelloForBusinessPinUsage
from msgraph.generated.models.enablement import Enablement
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = DeviceEnrollmentWindowsHelloForBusinessConfiguration(
odata_type = "#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration",
display_name = "Display Name value",
description = "Description value",
priority = 8,
version = 7,
pin_minimum_length = 0,
pin_maximum_length = 0,
pin_uppercase_characters_usage = WindowsHelloForBusinessPinUsage.Required,
pin_lowercase_characters_usage = WindowsHelloForBusinessPinUsage.Required,
pin_special_characters_usage = WindowsHelloForBusinessPinUsage.Required,
state = Enablement.Enabled,
security_device_required = True,
unlock_with_biometrics_enabled = True,
remote_passport_enabled = True,
pin_previous_block_count = 5,
pin_expiration_in_days = 3,
enhanced_biometrics_state = Enablement.Enabled,
)
result = await graph_client.device_management.device_enrollment_configurations.post(request_body)
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。