Namespace: microsoft.graph
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
Create a new windows81GeneralConfiguration object.
This API is available in the following national cloud deployments.
Global service |
US Government L4 |
US Government L5 (DOD) |
China operated by 21Vianet |
✅ |
✅ |
✅ |
✅ |
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type |
Permissions (from least to most privileged) |
Delegated (work or school account) |
DeviceManagementConfiguration.ReadWrite.All |
Delegated (personal Microsoft account) |
Not supported. |
Application |
DeviceManagementConfiguration.ReadWrite.All |
HTTP Request
POST /deviceManagement/deviceConfigurations
Request body
In the request body, supply a JSON representation for the windows81GeneralConfiguration object.
The following table shows the properties that are required when you create the windows81GeneralConfiguration.
Property |
Type |
Description |
id |
String |
Key of the entity. Inherited from deviceConfiguration |
lastModifiedDateTime |
DateTimeOffset |
DateTime the object was last modified. Inherited from deviceConfiguration |
createdDateTime |
DateTimeOffset |
DateTime the object was created. Inherited from deviceConfiguration |
description |
String |
Admin provided description of the Device Configuration. Inherited from deviceConfiguration |
displayName |
String |
Admin provided name of the device configuration. Inherited from deviceConfiguration |
version |
Int32 |
Version of the device configuration. Inherited from deviceConfiguration |
accountsBlockAddingNonMicrosoftAccountEmail |
Boolean |
Indicates whether or not to Block the user from adding email accounts to the device that are not associated with a Microsoft account. |
applyOnlyToWindows81 |
Boolean |
Value indicating whether this policy only applies to Windows 8.1. This property is read-only. |
browserBlockAutofill |
Boolean |
Indicates whether or not to block auto fill. |
browserBlockAutomaticDetectionOfIntranetSites |
Boolean |
Indicates whether or not to block automatic detection of Intranet sites. |
browserBlockEnterpriseModeAccess |
Boolean |
Indicates whether or not to block enterprise mode access. |
browserBlockJavaScript |
Boolean |
Indicates whether or not to Block the user from using JavaScript. |
browserBlockPlugins |
Boolean |
Indicates whether or not to block plug-ins. |
browserBlockPopups |
Boolean |
Indicates whether or not to block popups. |
browserBlockSendingDoNotTrackHeader |
Boolean |
Indicates whether or not to Block the user from sending the do not track header. |
browserBlockSingleWordEntryOnIntranetSites |
Boolean |
Indicates whether or not to block a single word entry on Intranet sites. |
browserRequireSmartScreen |
Boolean |
Indicates whether or not to require the user to use the smart screen filter. |
browserEnterpriseModeSiteListLocation |
String |
The enterprise mode site list location. Could be a local file, local network or http location. |
browserInternetSecurityLevel |
internetSiteSecurityLevel |
The internet security level. Possible values are: userDefined , medium , mediumHigh , high . |
browserIntranetSecurityLevel |
siteSecurityLevel |
The Intranet security level. Possible values are: userDefined , low , mediumLow , medium , mediumHigh , high . |
browserLoggingReportLocation |
String |
The logging report location. |
browserRequireHighSecurityForRestrictedSites |
Boolean |
Indicates whether or not to require high security for restricted sites. |
browserRequireFirewall |
Boolean |
Indicates whether or not to require a firewall. |
browserRequireFraudWarning |
Boolean |
Indicates whether or not to require fraud warning. |
browserTrustedSitesSecurityLevel |
siteSecurityLevel |
The trusted sites security level. Possible values are: userDefined , low , mediumLow , medium , mediumHigh , high . |
cellularBlockDataRoaming |
Boolean |
Indicates whether or not to block data roaming. |
diagnosticsBlockDataSubmission |
Boolean |
Indicates whether or not to block diagnostic data submission. |
passwordBlockPicturePasswordAndPin |
Boolean |
Indicates whether or not to Block the user from using a pictures password and pin. |
passwordExpirationDays |
Int32 |
Password expiration in days. |
passwordMinimumLength |
Int32 |
The minimum password length. |
passwordMinutesOfInactivityBeforeScreenTimeout |
Int32 |
The minutes of inactivity before the screen times out. |
passwordMinimumCharacterSetCount |
Int32 |
The number of character sets required in the password. |
passwordPreviousPasswordBlockCount |
Int32 |
The number of previous passwords to prevent re-use of. Valid values 0 to 24 |
passwordRequiredType |
requiredPasswordType |
The required password type. Possible values are: deviceDefault , alphanumeric , numeric . |
passwordSignInFailureCountBeforeFactoryReset |
Int32 |
The number of sign in failures before factory reset. |
storageRequireDeviceEncryption |
Boolean |
Indicates whether or not to require encryption on a mobile device. |
updatesRequireAutomaticUpdates |
Boolean |
Indicates whether or not to require automatic updates. |
userAccountControlSettings |
windowsUserAccountControlSettings |
The user account control settings. Possible values are: userDefined , alwaysNotify , notifyOnAppChanges , notifyOnAppChangesWithoutDimming , neverNotify . |
workFoldersUrl |
String |
The work folders url. |
Response
If successful, this method returns a 201 Created
response code and a windows81GeneralConfiguration object in the response body.
Example
Request
Here is an example of the request.
POST https://graph.microsoft.com/v1.0/deviceManagement/deviceConfigurations
Content-type: application/json
Content-length: 1693
{
"@odata.type": "#microsoft.graph.windows81GeneralConfiguration",
"description": "Description value",
"displayName": "Display Name value",
"version": 7,
"accountsBlockAddingNonMicrosoftAccountEmail": true,
"applyOnlyToWindows81": true,
"browserBlockAutofill": true,
"browserBlockAutomaticDetectionOfIntranetSites": true,
"browserBlockEnterpriseModeAccess": true,
"browserBlockJavaScript": true,
"browserBlockPlugins": true,
"browserBlockPopups": true,
"browserBlockSendingDoNotTrackHeader": true,
"browserBlockSingleWordEntryOnIntranetSites": true,
"browserRequireSmartScreen": true,
"browserEnterpriseModeSiteListLocation": "Browser Enterprise Mode Site List Location value",
"browserInternetSecurityLevel": "medium",
"browserIntranetSecurityLevel": "low",
"browserLoggingReportLocation": "Browser Logging Report Location value",
"browserRequireHighSecurityForRestrictedSites": true,
"browserRequireFirewall": true,
"browserRequireFraudWarning": true,
"browserTrustedSitesSecurityLevel": "low",
"cellularBlockDataRoaming": true,
"diagnosticsBlockDataSubmission": true,
"passwordBlockPicturePasswordAndPin": true,
"passwordExpirationDays": 6,
"passwordMinimumLength": 5,
"passwordMinutesOfInactivityBeforeScreenTimeout": 14,
"passwordMinimumCharacterSetCount": 0,
"passwordPreviousPasswordBlockCount": 2,
"passwordRequiredType": "alphanumeric",
"passwordSignInFailureCountBeforeFactoryReset": 12,
"storageRequireDeviceEncryption": true,
"updatesRequireAutomaticUpdates": true,
"userAccountControlSettings": "alwaysNotify",
"workFoldersUrl": "https://example.com/workFoldersUrl/"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new Windows81GeneralConfiguration
{
OdataType = "#microsoft.graph.windows81GeneralConfiguration",
Description = "Description value",
DisplayName = "Display Name value",
Version = 7,
AccountsBlockAddingNonMicrosoftAccountEmail = true,
ApplyOnlyToWindows81 = true,
BrowserBlockAutofill = true,
BrowserBlockAutomaticDetectionOfIntranetSites = true,
BrowserBlockEnterpriseModeAccess = true,
BrowserBlockJavaScript = true,
BrowserBlockPlugins = true,
BrowserBlockPopups = true,
BrowserBlockSendingDoNotTrackHeader = true,
BrowserBlockSingleWordEntryOnIntranetSites = true,
BrowserRequireSmartScreen = true,
BrowserEnterpriseModeSiteListLocation = "Browser Enterprise Mode Site List Location value",
BrowserInternetSecurityLevel = InternetSiteSecurityLevel.Medium,
BrowserIntranetSecurityLevel = SiteSecurityLevel.Low,
BrowserLoggingReportLocation = "Browser Logging Report Location value",
BrowserRequireHighSecurityForRestrictedSites = true,
BrowserRequireFirewall = true,
BrowserRequireFraudWarning = true,
BrowserTrustedSitesSecurityLevel = SiteSecurityLevel.Low,
CellularBlockDataRoaming = true,
DiagnosticsBlockDataSubmission = true,
PasswordBlockPicturePasswordAndPin = true,
PasswordExpirationDays = 6,
PasswordMinimumLength = 5,
PasswordMinutesOfInactivityBeforeScreenTimeout = 14,
PasswordMinimumCharacterSetCount = 0,
PasswordPreviousPasswordBlockCount = 2,
PasswordRequiredType = RequiredPasswordType.Alphanumeric,
PasswordSignInFailureCountBeforeFactoryReset = 12,
StorageRequireDeviceEncryption = true,
UpdatesRequireAutomaticUpdates = true,
UserAccountControlSettings = WindowsUserAccountControlSettings.AlwaysNotify,
WorkFoldersUrl = "https://example.com/workFoldersUrl/",
};
// 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);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// 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.NewDeviceConfiguration()
description := "Description value"
requestBody.SetDescription(&description)
displayName := "Display Name value"
requestBody.SetDisplayName(&displayName)
version := int32(7)
requestBody.SetVersion(&version)
accountsBlockAddingNonMicrosoftAccountEmail := true
requestBody.SetAccountsBlockAddingNonMicrosoftAccountEmail(&accountsBlockAddingNonMicrosoftAccountEmail)
applyOnlyToWindows81 := true
requestBody.SetApplyOnlyToWindows81(&applyOnlyToWindows81)
browserBlockAutofill := true
requestBody.SetBrowserBlockAutofill(&browserBlockAutofill)
browserBlockAutomaticDetectionOfIntranetSites := true
requestBody.SetBrowserBlockAutomaticDetectionOfIntranetSites(&browserBlockAutomaticDetectionOfIntranetSites)
browserBlockEnterpriseModeAccess := true
requestBody.SetBrowserBlockEnterpriseModeAccess(&browserBlockEnterpriseModeAccess)
browserBlockJavaScript := true
requestBody.SetBrowserBlockJavaScript(&browserBlockJavaScript)
browserBlockPlugins := true
requestBody.SetBrowserBlockPlugins(&browserBlockPlugins)
browserBlockPopups := true
requestBody.SetBrowserBlockPopups(&browserBlockPopups)
browserBlockSendingDoNotTrackHeader := true
requestBody.SetBrowserBlockSendingDoNotTrackHeader(&browserBlockSendingDoNotTrackHeader)
browserBlockSingleWordEntryOnIntranetSites := true
requestBody.SetBrowserBlockSingleWordEntryOnIntranetSites(&browserBlockSingleWordEntryOnIntranetSites)
browserRequireSmartScreen := true
requestBody.SetBrowserRequireSmartScreen(&browserRequireSmartScreen)
browserEnterpriseModeSiteListLocation := "Browser Enterprise Mode Site List Location value"
requestBody.SetBrowserEnterpriseModeSiteListLocation(&browserEnterpriseModeSiteListLocation)
browserInternetSecurityLevel := graphmodels.MEDIUM_INTERNETSITESECURITYLEVEL
requestBody.SetBrowserInternetSecurityLevel(&browserInternetSecurityLevel)
browserIntranetSecurityLevel := graphmodels.LOW_SITESECURITYLEVEL
requestBody.SetBrowserIntranetSecurityLevel(&browserIntranetSecurityLevel)
browserLoggingReportLocation := "Browser Logging Report Location value"
requestBody.SetBrowserLoggingReportLocation(&browserLoggingReportLocation)
browserRequireHighSecurityForRestrictedSites := true
requestBody.SetBrowserRequireHighSecurityForRestrictedSites(&browserRequireHighSecurityForRestrictedSites)
browserRequireFirewall := true
requestBody.SetBrowserRequireFirewall(&browserRequireFirewall)
browserRequireFraudWarning := true
requestBody.SetBrowserRequireFraudWarning(&browserRequireFraudWarning)
browserTrustedSitesSecurityLevel := graphmodels.LOW_SITESECURITYLEVEL
requestBody.SetBrowserTrustedSitesSecurityLevel(&browserTrustedSitesSecurityLevel)
cellularBlockDataRoaming := true
requestBody.SetCellularBlockDataRoaming(&cellularBlockDataRoaming)
diagnosticsBlockDataSubmission := true
requestBody.SetDiagnosticsBlockDataSubmission(&diagnosticsBlockDataSubmission)
passwordBlockPicturePasswordAndPin := true
requestBody.SetPasswordBlockPicturePasswordAndPin(&passwordBlockPicturePasswordAndPin)
passwordExpirationDays := int32(6)
requestBody.SetPasswordExpirationDays(&passwordExpirationDays)
passwordMinimumLength := int32(5)
requestBody.SetPasswordMinimumLength(&passwordMinimumLength)
passwordMinutesOfInactivityBeforeScreenTimeout := int32(14)
requestBody.SetPasswordMinutesOfInactivityBeforeScreenTimeout(&passwordMinutesOfInactivityBeforeScreenTimeout)
passwordMinimumCharacterSetCount := int32(0)
requestBody.SetPasswordMinimumCharacterSetCount(&passwordMinimumCharacterSetCount)
passwordPreviousPasswordBlockCount := int32(2)
requestBody.SetPasswordPreviousPasswordBlockCount(&passwordPreviousPasswordBlockCount)
passwordRequiredType := graphmodels.ALPHANUMERIC_REQUIREDPASSWORDTYPE
requestBody.SetPasswordRequiredType(&passwordRequiredType)
passwordSignInFailureCountBeforeFactoryReset := int32(12)
requestBody.SetPasswordSignInFailureCountBeforeFactoryReset(&passwordSignInFailureCountBeforeFactoryReset)
storageRequireDeviceEncryption := true
requestBody.SetStorageRequireDeviceEncryption(&storageRequireDeviceEncryption)
updatesRequireAutomaticUpdates := true
requestBody.SetUpdatesRequireAutomaticUpdates(&updatesRequireAutomaticUpdates)
userAccountControlSettings := graphmodels.ALWAYSNOTIFY_WINDOWSUSERACCOUNTCONTROLSETTINGS
requestBody.SetUserAccountControlSettings(&userAccountControlSettings)
workFoldersUrl := "https://example.com/workFoldersUrl/"
requestBody.SetWorkFoldersUrl(&workFoldersUrl)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
deviceConfigurations, err := graphClient.DeviceManagement().DeviceConfigurations().Post(context.Background(), requestBody, nil)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
Windows81GeneralConfiguration deviceConfiguration = new Windows81GeneralConfiguration();
deviceConfiguration.setOdataType("#microsoft.graph.windows81GeneralConfiguration");
deviceConfiguration.setDescription("Description value");
deviceConfiguration.setDisplayName("Display Name value");
deviceConfiguration.setVersion(7);
deviceConfiguration.setAccountsBlockAddingNonMicrosoftAccountEmail(true);
deviceConfiguration.setApplyOnlyToWindows81(true);
deviceConfiguration.setBrowserBlockAutofill(true);
deviceConfiguration.setBrowserBlockAutomaticDetectionOfIntranetSites(true);
deviceConfiguration.setBrowserBlockEnterpriseModeAccess(true);
deviceConfiguration.setBrowserBlockJavaScript(true);
deviceConfiguration.setBrowserBlockPlugins(true);
deviceConfiguration.setBrowserBlockPopups(true);
deviceConfiguration.setBrowserBlockSendingDoNotTrackHeader(true);
deviceConfiguration.setBrowserBlockSingleWordEntryOnIntranetSites(true);
deviceConfiguration.setBrowserRequireSmartScreen(true);
deviceConfiguration.setBrowserEnterpriseModeSiteListLocation("Browser Enterprise Mode Site List Location value");
deviceConfiguration.setBrowserInternetSecurityLevel(InternetSiteSecurityLevel.Medium);
deviceConfiguration.setBrowserIntranetSecurityLevel(SiteSecurityLevel.Low);
deviceConfiguration.setBrowserLoggingReportLocation("Browser Logging Report Location value");
deviceConfiguration.setBrowserRequireHighSecurityForRestrictedSites(true);
deviceConfiguration.setBrowserRequireFirewall(true);
deviceConfiguration.setBrowserRequireFraudWarning(true);
deviceConfiguration.setBrowserTrustedSitesSecurityLevel(SiteSecurityLevel.Low);
deviceConfiguration.setCellularBlockDataRoaming(true);
deviceConfiguration.setDiagnosticsBlockDataSubmission(true);
deviceConfiguration.setPasswordBlockPicturePasswordAndPin(true);
deviceConfiguration.setPasswordExpirationDays(6);
deviceConfiguration.setPasswordMinimumLength(5);
deviceConfiguration.setPasswordMinutesOfInactivityBeforeScreenTimeout(14);
deviceConfiguration.setPasswordMinimumCharacterSetCount(0);
deviceConfiguration.setPasswordPreviousPasswordBlockCount(2);
deviceConfiguration.setPasswordRequiredType(RequiredPasswordType.Alphanumeric);
deviceConfiguration.setPasswordSignInFailureCountBeforeFactoryReset(12);
deviceConfiguration.setStorageRequireDeviceEncryption(true);
deviceConfiguration.setUpdatesRequireAutomaticUpdates(true);
deviceConfiguration.setUserAccountControlSettings(WindowsUserAccountControlSettings.AlwaysNotify);
deviceConfiguration.setWorkFoldersUrl("https://example.com/workFoldersUrl/");
DeviceConfiguration result = graphClient.deviceManagement().deviceConfigurations().post(deviceConfiguration);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
const options = {
authProvider,
};
const client = Client.init(options);
const deviceConfiguration = {
'@odata.type': '#microsoft.graph.windows81GeneralConfiguration',
description: 'Description value',
displayName: 'Display Name value',
version: 7,
accountsBlockAddingNonMicrosoftAccountEmail: true,
applyOnlyToWindows81: true,
browserBlockAutofill: true,
browserBlockAutomaticDetectionOfIntranetSites: true,
browserBlockEnterpriseModeAccess: true,
browserBlockJavaScript: true,
browserBlockPlugins: true,
browserBlockPopups: true,
browserBlockSendingDoNotTrackHeader: true,
browserBlockSingleWordEntryOnIntranetSites: true,
browserRequireSmartScreen: true,
browserEnterpriseModeSiteListLocation: 'Browser Enterprise Mode Site List Location value',
browserInternetSecurityLevel: 'medium',
browserIntranetSecurityLevel: 'low',
browserLoggingReportLocation: 'Browser Logging Report Location value',
browserRequireHighSecurityForRestrictedSites: true,
browserRequireFirewall: true,
browserRequireFraudWarning: true,
browserTrustedSitesSecurityLevel: 'low',
cellularBlockDataRoaming: true,
diagnosticsBlockDataSubmission: true,
passwordBlockPicturePasswordAndPin: true,
passwordExpirationDays: 6,
passwordMinimumLength: 5,
passwordMinutesOfInactivityBeforeScreenTimeout: 14,
passwordMinimumCharacterSetCount: 0,
passwordPreviousPasswordBlockCount: 2,
passwordRequiredType: 'alphanumeric',
passwordSignInFailureCountBeforeFactoryReset: 12,
storageRequireDeviceEncryption: true,
updatesRequireAutomaticUpdates: true,
userAccountControlSettings: 'alwaysNotify',
workFoldersUrl: 'https://example.com/workFoldersUrl/'
};
await client.api('/deviceManagement/deviceConfigurations')
.post(deviceConfiguration);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\Windows81GeneralConfiguration;
use Microsoft\Graph\Generated\Models\InternetSiteSecurityLevel;
use Microsoft\Graph\Generated\Models\SiteSecurityLevel;
use Microsoft\Graph\Generated\Models\RequiredPasswordType;
use Microsoft\Graph\Generated\Models\WindowsUserAccountControlSettings;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Windows81GeneralConfiguration();
$requestBody->setOdataType('#microsoft.graph.windows81GeneralConfiguration');
$requestBody->setDescription('Description value');
$requestBody->setDisplayName('Display Name value');
$requestBody->setVersion(7);
$requestBody->setAccountsBlockAddingNonMicrosoftAccountEmail(true);
$requestBody->setApplyOnlyToWindows81(true);
$requestBody->setBrowserBlockAutofill(true);
$requestBody->setBrowserBlockAutomaticDetectionOfIntranetSites(true);
$requestBody->setBrowserBlockEnterpriseModeAccess(true);
$requestBody->setBrowserBlockJavaScript(true);
$requestBody->setBrowserBlockPlugins(true);
$requestBody->setBrowserBlockPopups(true);
$requestBody->setBrowserBlockSendingDoNotTrackHeader(true);
$requestBody->setBrowserBlockSingleWordEntryOnIntranetSites(true);
$requestBody->setBrowserRequireSmartScreen(true);
$requestBody->setBrowserEnterpriseModeSiteListLocation('Browser Enterprise Mode Site List Location value');
$requestBody->setBrowserInternetSecurityLevel(new InternetSiteSecurityLevel('medium'));
$requestBody->setBrowserIntranetSecurityLevel(new SiteSecurityLevel('low'));
$requestBody->setBrowserLoggingReportLocation('Browser Logging Report Location value');
$requestBody->setBrowserRequireHighSecurityForRestrictedSites(true);
$requestBody->setBrowserRequireFirewall(true);
$requestBody->setBrowserRequireFraudWarning(true);
$requestBody->setBrowserTrustedSitesSecurityLevel(new SiteSecurityLevel('low'));
$requestBody->setCellularBlockDataRoaming(true);
$requestBody->setDiagnosticsBlockDataSubmission(true);
$requestBody->setPasswordBlockPicturePasswordAndPin(true);
$requestBody->setPasswordExpirationDays(6);
$requestBody->setPasswordMinimumLength(5);
$requestBody->setPasswordMinutesOfInactivityBeforeScreenTimeout(14);
$requestBody->setPasswordMinimumCharacterSetCount(0);
$requestBody->setPasswordPreviousPasswordBlockCount(2);
$requestBody->setPasswordRequiredType(new RequiredPasswordType('alphanumeric'));
$requestBody->setPasswordSignInFailureCountBeforeFactoryReset(12);
$requestBody->setStorageRequireDeviceEncryption(true);
$requestBody->setUpdatesRequireAutomaticUpdates(true);
$requestBody->setUserAccountControlSettings(new WindowsUserAccountControlSettings('alwaysNotify'));
$requestBody->setWorkFoldersUrl('https://example.com/workFoldersUrl/');
$result = $graphServiceClient->deviceManagement()->deviceConfigurations()->post($requestBody)->wait();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Import-Module Microsoft.Graph.DeviceManagement
$params = @{
"@odata.type" = "#microsoft.graph.windows81GeneralConfiguration"
description = "Description value"
displayName = "Display Name value"
version = 7
accountsBlockAddingNonMicrosoftAccountEmail = $true
applyOnlyToWindows81 = $true
browserBlockAutofill = $true
browserBlockAutomaticDetectionOfIntranetSites = $true
browserBlockEnterpriseModeAccess = $true
browserBlockJavaScript = $true
browserBlockPlugins = $true
browserBlockPopups = $true
browserBlockSendingDoNotTrackHeader = $true
browserBlockSingleWordEntryOnIntranetSites = $true
browserRequireSmartScreen = $true
browserEnterpriseModeSiteListLocation = "Browser Enterprise Mode Site List Location value"
browserInternetSecurityLevel = "medium"
browserIntranetSecurityLevel = "low"
browserLoggingReportLocation = "Browser Logging Report Location value"
browserRequireHighSecurityForRestrictedSites = $true
browserRequireFirewall = $true
browserRequireFraudWarning = $true
browserTrustedSitesSecurityLevel = "low"
cellularBlockDataRoaming = $true
diagnosticsBlockDataSubmission = $true
passwordBlockPicturePasswordAndPin = $true
passwordExpirationDays =
passwordMinimumLength =
passwordMinutesOfInactivityBeforeScreenTimeout =
passwordMinimumCharacterSetCount =
passwordPreviousPasswordBlockCount =
passwordRequiredType = "alphanumeric"
passwordSignInFailureCountBeforeFactoryReset =
storageRequireDeviceEncryption = $true
updatesRequireAutomaticUpdates = $true
userAccountControlSettings = "alwaysNotify"
workFoldersUrl = "https://example.com/workFoldersUrl/"
}
New-MgDeviceManagementDeviceConfiguration -BodyParameter $params
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.windows81_general_configuration import Windows81GeneralConfiguration
from msgraph.generated.models.internet_site_security_level import InternetSiteSecurityLevel
from msgraph.generated.models.site_security_level import SiteSecurityLevel
from msgraph.generated.models.required_password_type import RequiredPasswordType
from msgraph.generated.models.windows_user_account_control_settings import WindowsUserAccountControlSettings
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Windows81GeneralConfiguration(
odata_type = "#microsoft.graph.windows81GeneralConfiguration",
description = "Description value",
display_name = "Display Name value",
version = 7,
accounts_block_adding_non_microsoft_account_email = True,
apply_only_to_windows81 = True,
browser_block_autofill = True,
browser_block_automatic_detection_of_intranet_sites = True,
browser_block_enterprise_mode_access = True,
browser_block_java_script = True,
browser_block_plugins = True,
browser_block_popups = True,
browser_block_sending_do_not_track_header = True,
browser_block_single_word_entry_on_intranet_sites = True,
browser_require_smart_screen = True,
browser_enterprise_mode_site_list_location = "Browser Enterprise Mode Site List Location value",
browser_internet_security_level = InternetSiteSecurityLevel.Medium,
browser_intranet_security_level = SiteSecurityLevel.Low,
browser_logging_report_location = "Browser Logging Report Location value",
browser_require_high_security_for_restricted_sites = True,
browser_require_firewall = True,
browser_require_fraud_warning = True,
browser_trusted_sites_security_level = SiteSecurityLevel.Low,
cellular_block_data_roaming = True,
diagnostics_block_data_submission = True,
password_block_picture_password_and_pin = True,
password_expiration_days = 6,
password_minimum_length = 5,
password_minutes_of_inactivity_before_screen_timeout = 14,
password_minimum_character_set_count = 0,
password_previous_password_block_count = 2,
password_required_type = RequiredPasswordType.Alphanumeric,
password_sign_in_failure_count_before_factory_reset = 12,
storage_require_device_encryption = True,
updates_require_automatic_updates = True,
user_account_control_settings = WindowsUserAccountControlSettings.AlwaysNotify,
work_folders_url = "https://example.com/workFoldersUrl/",
)
result = await graph_client.device_management.device_configurations.post(request_body)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Response
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.
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1865
{
"@odata.type": "#microsoft.graph.windows81GeneralConfiguration",
"id": "0e9285b5-85b5-0e92-b585-920eb585920e",
"lastModifiedDateTime": "2017-01-01T00:00:35.1329464-08:00",
"createdDateTime": "2017-01-01T00:02:43.5775965-08:00",
"description": "Description value",
"displayName": "Display Name value",
"version": 7,
"accountsBlockAddingNonMicrosoftAccountEmail": true,
"applyOnlyToWindows81": true,
"browserBlockAutofill": true,
"browserBlockAutomaticDetectionOfIntranetSites": true,
"browserBlockEnterpriseModeAccess": true,
"browserBlockJavaScript": true,
"browserBlockPlugins": true,
"browserBlockPopups": true,
"browserBlockSendingDoNotTrackHeader": true,
"browserBlockSingleWordEntryOnIntranetSites": true,
"browserRequireSmartScreen": true,
"browserEnterpriseModeSiteListLocation": "Browser Enterprise Mode Site List Location value",
"browserInternetSecurityLevel": "medium",
"browserIntranetSecurityLevel": "low",
"browserLoggingReportLocation": "Browser Logging Report Location value",
"browserRequireHighSecurityForRestrictedSites": true,
"browserRequireFirewall": true,
"browserRequireFraudWarning": true,
"browserTrustedSitesSecurityLevel": "low",
"cellularBlockDataRoaming": true,
"diagnosticsBlockDataSubmission": true,
"passwordBlockPicturePasswordAndPin": true,
"passwordExpirationDays": 6,
"passwordMinimumLength": 5,
"passwordMinutesOfInactivityBeforeScreenTimeout": 14,
"passwordMinimumCharacterSetCount": 0,
"passwordPreviousPasswordBlockCount": 2,
"passwordRequiredType": "alphanumeric",
"passwordSignInFailureCountBeforeFactoryReset": 12,
"storageRequireDeviceEncryption": true,
"updatesRequireAutomaticUpdates": true,
"userAccountControlSettings": "alwaysNotify",
"workFoldersUrl": "https://example.com/workFoldersUrl/"
}