Create androidWorkProfileGeneralDeviceConfiguration

Namespace: microsoft.graph

Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.

Create a new androidWorkProfileGeneralDeviceConfiguration 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 headers

Header Value
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Accept application/json

Request body

In the request body, supply a JSON representation for the androidWorkProfileGeneralDeviceConfiguration object.

The following table shows the properties that are required when you create the androidWorkProfileGeneralDeviceConfiguration.

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
passwordBlockFingerprintUnlock Boolean Indicates whether or not to block fingerprint unlock.
passwordBlockTrustAgents Boolean Indicates whether or not to block Smart Lock and other trust agents.
passwordExpirationDays Int32 Number of days before the password expires. Valid values 1 to 365
passwordMinimumLength Int32 Minimum length of passwords. Valid values 4 to 16
passwordMinutesOfInactivityBeforeScreenTimeout Int32 Minutes of inactivity before the screen times out.
passwordPreviousPasswordBlockCount Int32 Number of previous passwords to block. Valid values 0 to 24
passwordSignInFailureCountBeforeFactoryReset Int32 Number of sign in failures allowed before factory reset. Valid values 1 to 16
passwordRequiredType androidWorkProfileRequiredPasswordType Type of password that is required. Possible values are: deviceDefault, lowSecurityBiometric, required, atLeastNumeric, numericComplex, atLeastAlphabetic, atLeastAlphanumeric, alphanumericWithSymbols.
workProfileDataSharingType androidWorkProfileCrossProfileDataSharingType Type of data sharing that is allowed. Possible values are: deviceDefault, preventAny, allowPersonalToWork, noRestrictions.
workProfileBlockNotificationsWhileDeviceLocked Boolean Indicates whether or not to block notifications while device locked.
workProfileBlockAddingAccounts Boolean Block users from adding/removing accounts in work profile.
workProfileBluetoothEnableContactSharing Boolean Allow bluetooth devices to access enterprise contacts.
workProfileBlockScreenCapture Boolean Block screen capture in work profile.
workProfileBlockCrossProfileCallerId Boolean Block display work profile caller ID in personal profile.
workProfileBlockCamera Boolean Block work profile camera.
workProfileBlockCrossProfileContactsSearch Boolean Block work profile contacts availability in personal profile.
workProfileBlockCrossProfileCopyPaste Boolean Boolean that indicates if the setting disallow cross profile copy/paste is enabled.
workProfileDefaultAppPermissionPolicy androidWorkProfileDefaultAppPermissionPolicyType Type of password that is required. Possible values are: deviceDefault, prompt, autoGrant, autoDeny.
workProfilePasswordBlockFingerprintUnlock Boolean Indicates whether or not to block fingerprint unlock for work profile.
workProfilePasswordBlockTrustAgents Boolean Indicates whether or not to block Smart Lock and other trust agents for work profile.
workProfilePasswordExpirationDays Int32 Number of days before the work profile password expires. Valid values 1 to 365
workProfilePasswordMinimumLength Int32 Minimum length of work profile password. Valid values 4 to 16
workProfilePasswordMinNumericCharacters Int32 Minimum # of numeric characters required in work profile password. Valid values 1 to 10
workProfilePasswordMinNonLetterCharacters Int32 Minimum # of non-letter characters required in work profile password. Valid values 1 to 10
workProfilePasswordMinLetterCharacters Int32 Minimum # of letter characters required in work profile password. Valid values 1 to 10
workProfilePasswordMinLowerCaseCharacters Int32 Minimum # of lower-case characters required in work profile password. Valid values 1 to 10
workProfilePasswordMinUpperCaseCharacters Int32 Minimum # of upper-case characters required in work profile password. Valid values 1 to 10
workProfilePasswordMinSymbolCharacters Int32 Minimum # of symbols required in work profile password. Valid values 1 to 10
workProfilePasswordMinutesOfInactivityBeforeScreenTimeout Int32 Minutes of inactivity before the screen times out.
workProfilePasswordPreviousPasswordBlockCount Int32 Number of previous work profile passwords to block. Valid values 0 to 24
workProfilePasswordSignInFailureCountBeforeFactoryReset Int32 Number of sign in failures allowed before work profile is removed and all corporate data deleted. Valid values 1 to 16
workProfilePasswordRequiredType androidWorkProfileRequiredPasswordType Type of work profile password that is required. Possible values are: deviceDefault, lowSecurityBiometric, required, atLeastNumeric, numericComplex, atLeastAlphabetic, atLeastAlphanumeric, alphanumericWithSymbols.
workProfileRequirePassword Boolean Password is required or not for work profile
securityRequireVerifyApps Boolean Require the Android Verify apps feature is turned on.

Response

If successful, this method returns a 201 Created response code and a androidWorkProfileGeneralDeviceConfiguration 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: 1831

{
  "@odata.type": "#microsoft.graph.androidWorkProfileGeneralDeviceConfiguration",
  "description": "Description value",
  "displayName": "Display Name value",
  "version": 7,
  "passwordBlockFingerprintUnlock": true,
  "passwordBlockTrustAgents": true,
  "passwordExpirationDays": 6,
  "passwordMinimumLength": 5,
  "passwordMinutesOfInactivityBeforeScreenTimeout": 14,
  "passwordPreviousPasswordBlockCount": 2,
  "passwordSignInFailureCountBeforeFactoryReset": 12,
  "passwordRequiredType": "lowSecurityBiometric",
  "workProfileDataSharingType": "preventAny",
  "workProfileBlockNotificationsWhileDeviceLocked": true,
  "workProfileBlockAddingAccounts": true,
  "workProfileBluetoothEnableContactSharing": true,
  "workProfileBlockScreenCapture": true,
  "workProfileBlockCrossProfileCallerId": true,
  "workProfileBlockCamera": true,
  "workProfileBlockCrossProfileContactsSearch": true,
  "workProfileBlockCrossProfileCopyPaste": true,
  "workProfileDefaultAppPermissionPolicy": "prompt",
  "workProfilePasswordBlockFingerprintUnlock": true,
  "workProfilePasswordBlockTrustAgents": true,
  "workProfilePasswordExpirationDays": 1,
  "workProfilePasswordMinimumLength": 0,
  "workProfilePasswordMinNumericCharacters": 7,
  "workProfilePasswordMinNonLetterCharacters": 9,
  "workProfilePasswordMinLetterCharacters": 6,
  "workProfilePasswordMinLowerCaseCharacters": 9,
  "workProfilePasswordMinUpperCaseCharacters": 9,
  "workProfilePasswordMinSymbolCharacters": 6,
  "workProfilePasswordMinutesOfInactivityBeforeScreenTimeout": 9,
  "workProfilePasswordPreviousPasswordBlockCount": 13,
  "workProfilePasswordSignInFailureCountBeforeFactoryReset": 7,
  "workProfilePasswordRequiredType": "lowSecurityBiometric",
  "workProfileRequirePassword": true,
  "securityRequireVerifyApps": true
}

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: 2003

{
  "@odata.type": "#microsoft.graph.androidWorkProfileGeneralDeviceConfiguration",
  "id": "6decda7e-da7e-6dec-7eda-ec6d7edaec6d",
  "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,
  "passwordBlockFingerprintUnlock": true,
  "passwordBlockTrustAgents": true,
  "passwordExpirationDays": 6,
  "passwordMinimumLength": 5,
  "passwordMinutesOfInactivityBeforeScreenTimeout": 14,
  "passwordPreviousPasswordBlockCount": 2,
  "passwordSignInFailureCountBeforeFactoryReset": 12,
  "passwordRequiredType": "lowSecurityBiometric",
  "workProfileDataSharingType": "preventAny",
  "workProfileBlockNotificationsWhileDeviceLocked": true,
  "workProfileBlockAddingAccounts": true,
  "workProfileBluetoothEnableContactSharing": true,
  "workProfileBlockScreenCapture": true,
  "workProfileBlockCrossProfileCallerId": true,
  "workProfileBlockCamera": true,
  "workProfileBlockCrossProfileContactsSearch": true,
  "workProfileBlockCrossProfileCopyPaste": true,
  "workProfileDefaultAppPermissionPolicy": "prompt",
  "workProfilePasswordBlockFingerprintUnlock": true,
  "workProfilePasswordBlockTrustAgents": true,
  "workProfilePasswordExpirationDays": 1,
  "workProfilePasswordMinimumLength": 0,
  "workProfilePasswordMinNumericCharacters": 7,
  "workProfilePasswordMinNonLetterCharacters": 9,
  "workProfilePasswordMinLetterCharacters": 6,
  "workProfilePasswordMinLowerCaseCharacters": 9,
  "workProfilePasswordMinUpperCaseCharacters": 9,
  "workProfilePasswordMinSymbolCharacters": 6,
  "workProfilePasswordMinutesOfInactivityBeforeScreenTimeout": 9,
  "workProfilePasswordPreviousPasswordBlockCount": 13,
  "workProfilePasswordSignInFailureCountBeforeFactoryReset": 7,
  "workProfilePasswordRequiredType": "lowSecurityBiometric",
  "workProfileRequirePassword": true,
  "securityRequireVerifyApps": true
}