Tool: get_policy
Gets a policy for a given enterprise and policy ID. Requires the resource name in the format: enterprises/{enterpriseId}/policies/{policyId}.
The following sample demonstrate how to use curl to invoke the get_policy MCP tool.
| Curl Request |
|---|
curl --location 'https://androidmanagement.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "get_policy", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request to get a policy.
GetPolicyRequest
| JSON representation |
|---|
{ "name": string } |
| Fields | |
|---|---|
name |
The name of the policy in the form |
Output Schema
A policy resource represents a group of settings that govern the behavior of a managed device and the apps installed on it.
Policy
| JSON representation |
|---|
{ "name": string, "version": string, "applications": [ { object ( |
| Fields | |
|---|---|
name |
The name of the policy in the form |
version |
The version of the policy. This is a read-only field. The version is incremented each time the policy is updated. |
applications[] |
Policy applied to apps. This can have at most 3,000 elements. |
maximumTimeToLock |
Maximum time in milliseconds for user activity until the device locks. A value of 0 means there is no restriction. |
screenCaptureDisabled |
Whether screen capture is disabled. |
cameraDisabled |
If |
keyguardDisabledFeatures[] |
Disabled keyguard customizations, such as widgets. |
defaultPermissionPolicy |
The default permission policy for runtime permission requests. |
persistentPreferredActivities[] |
Default intent handler activities. |
openNetworkConfiguration |
Network configuration for the device. See configure networks for more information. |
systemUpdate |
The system update policy, which controls how OS updates are applied. If the update type is Note: Google Play system updates (also called Mainline updates) are automatically downloaded and require a device reboot to be installed. Refer to the mainline section in Manage system updates for further details. |
accountTypesWithManagementDisabled[] |
Account types that can't be managed by the user. |
addUserDisabled |
Whether adding new users and profiles is disabled. For devices where |
adjustVolumeDisabled |
Whether adjusting the master volume is disabled. Also mutes the device. The setting has effect only on fully managed devices. |
factoryResetDisabled |
Whether factory resetting from settings is disabled. |
installAppsDisabled |
Whether user installation of apps is disabled. |
mountPhysicalMediaDisabled |
Whether the user mounting physical external media is disabled. |
modifyAccountsDisabled |
Whether adding or removing accounts is disabled. |
safeBootDisabled |
Whether rebooting the device into safe boot is disabled. |
uninstallAppsDisabled |
Whether user uninstallation of applications is disabled. This prevents apps from being uninstalled, even those removed using |
statusBarDisabled |
Whether the status bar is disabled. This disables notifications, quick settings, and other screen overlays that allow escape from full-screen mode. DEPRECATED. To disable the status bar on a kiosk device, use InstallType |
keyguardDisabled |
If true, this disables the Lock Screen for primary and/or secondary displays. This policy is supported only in dedicated device management mode. |
minimumApiLevel |
The minimum allowed Android API level. |
statusReportingSettings |
Status reporting settings |
bluetoothContactSharingDisabled |
Whether bluetooth contact sharing is disabled. |
shortSupportMessage |
A message displayed to the user in the settings screen wherever functionality has been disabled by the admin. If the message is longer than 200 characters it may be truncated. |
longSupportMessage |
A message displayed to the user in the device administators settings screen. |
passwordRequirements |
Password requirements. The field Note: Complexity-based values of |
wifiConfigsLockdownEnabled |
This is deprecated. |
bluetoothConfigDisabled |
Whether configuring bluetooth is disabled. |
cellBroadcastsConfigDisabled |
Whether configuring cell broadcast is disabled. |
credentialsConfigDisabled |
Whether configuring user credentials is disabled. |
mobileNetworksConfigDisabled |
Whether configuring mobile networks is disabled. |
tetheringConfigDisabled |
Whether configuring tethering and portable hotspots is disabled. If |
vpnConfigDisabled |
Whether configuring VPN is disabled. |
wifiConfigDisabled |
Whether configuring Wi-Fi networks is disabled. Supported on fully managed devices and work profiles on company-owned devices. For fully managed devices, setting this to true removes all configured networks and retains only the networks configured using |
createWindowsDisabled |
Whether creating windows besides app windows is disabled. |
networkResetDisabled |
Whether resetting network settings is disabled. |
outgoingBeamDisabled |
Whether using NFC to beam data from apps is disabled. |
outgoingCallsDisabled |
Whether outgoing calls are disabled. |
removeUserDisabled |
Whether removing other users is disabled. |
shareLocationDisabled |
Whether location sharing is disabled. |
smsDisabled |
Whether sending and receiving SMS messages is disabled. |
unmuteMicrophoneDisabled |
If |
usbFileTransferDisabled |
Whether transferring files over USB is disabled. This is supported only on company-owned devices. |
ensureVerifyAppsEnabled |
Whether app verification is force-enabled. |
permittedInputMethods |
If present, only the input methods provided by packages in this list are permitted. If this field is present, but the list is empty, then only system input methods are permitted. |
stayOnPluggedModes[] |
The battery plugged in modes for which the device stays on. When using this setting, it is recommended to clear |
recommendedGlobalProxy |
The network-independent global HTTP proxy. Typically proxies should be configured per-network in |
setUserIconDisabled |
Whether changing the user icon is disabled. This applies only on devices running Android 7 and above. |
setWallpaperDisabled |
Whether changing the wallpaper is disabled. |
choosePrivateKeyRules[] |
Rules for determining apps' access to private keys. See |
alwaysOnVpnPackage |
Configuration for an always-on VPN connection. Use with |
frpAdminEmails[] |
Email addresses of device administrators for factory reset protection. When the device is factory reset, it will require one of these admins to log in with the Google account email and password to unlock the device. If no admins are specified, the device won't provide factory reset protection. |
deviceOwnerLockScreenInfo |
The device owner information to be shown on the lock screen. |
dataRoamingDisabled |
Whether roaming data services are disabled. |
locationMode |
The degree of location detection enabled. |
networkEscapeHatchEnabled |
Whether the network escape hatch is enabled. If a network connection can't be made at boot time, the escape hatch prompts the user to temporarily connect to a network in order to refresh the device policy. After applying policy, the temporary network will be forgotten and the device will continue booting. This prevents being unable to connect to a network if there is no suitable network in the last policy and the device boots into an app in lock task mode, or the user is otherwise unable to reach device settings. Note: Setting |
bluetoothDisabled |
Whether bluetooth is disabled. Prefer this setting over |
complianceRules[] |
Rules declaring which mitigating actions to take when a device is not compliant with its policy. When the conditions for multiple rules are satisfied, all of the mitigating actions for the rules are taken. There is a maximum limit of 100 rules. Use policy enforcement rules instead. |
blockApplicationsEnabled |
Whether applications other than the ones configured in |
installUnknownSourcesAllowed |
This field has no effect. |
debuggingFeaturesAllowed |
Whether the user is allowed to enable debugging features. |
funDisabled |
Whether the user is allowed to have fun. Controls whether the Easter egg game in Settings is disabled. |
autoTimeRequired |
Whether auto time is required, which prevents the user from manually setting the date and time. If |
permittedAccessibilityServices |
Specifies permitted accessibility services. If the field is not set, any accessibility service can be used. If the field is set, only the accessibility services in this list and the system's built-in accessibility service can be used. In particular, if the field is set to empty, only the system's built-in accessibility servicess can be used. This can be set on fully managed devices and on work profiles. When applied to a work profile, this affects both the personal profile and the work profile. |
appAutoUpdatePolicy |
Recommended alternative: When The app auto update policy, which controls when automatic app updates can be applied. |
kioskCustomLauncherEnabled |
Whether the kiosk custom launcher is enabled. This replaces the home screen with a launcher that locks down the device to the apps installed via the |
androidDevicePolicyTracks[] |
This setting is not supported. Any value is ignored. |
skipFirstUseHintsEnabled |
Flag to skip hints on the first use. Enterprise admin can enable the system recommendation for apps to skip their user tutorial and other introductory hints on first start-up. |
privateKeySelectionEnabled |
Allows showing UI on a device for a user to choose a private key alias if there are no matching rules in ChoosePrivateKeyRules. For devices below Android P, setting this may leave enterprise keys vulnerable. This value will have no effect if any application has |
encryptionPolicy |
Whether encryption is enabled |
usbMassStorageEnabled |
Whether USB storage is enabled. Deprecated. |
permissionGrants[] |
Explicit permission or group grants or denials for all apps. These values override the |
playStoreMode |
This mode controls which apps are available to the user in the Play Store and the behavior on the device when apps are removed from the policy. |
setupActions[] |
Action to take during the setup process. At most one action may be specified. |
passwordPolicies[] |
Password requirement policies. Different policies can be set for work profile or fully managed devices by setting the |
policyEnforcementRules[] |
Rules that define the behavior when a particular policy can not be applied on device |
kioskCustomization |
Settings controlling the behavior of a device in kiosk mode. To enable kiosk mode, set |
advancedSecurityOverrides |
Advanced security settings. In most cases, setting these is not needed. |
personalUsagePolicies |
Policies managing personal usage on a company-owned device. |
autoDateAndTimeZone |
Whether auto date, time, and time zone are enabled on a company-owned device. If this is set, then |
oncCertificateProviders[] |
This feature is not generally available. |
crossProfilePolicies |
Cross-profile policies applied on the device. |
preferentialNetworkService |
Controls whether preferential network service is enabled on the work profile or on fully managed devices. For example, an organization may have an agreement with a carrier that all of the work data from its employees' devices will be sent via a network service dedicated for enterprise use. An example of a supported preferential network service is the enterprise slice on 5G networks. This policy has no effect if |
usageLog |
Configuration of device activity logging. |
cameraAccess |
Controls the use of the camera and whether the user has access to the camera access toggle. |
microphoneAccess |
Controls the use of the microphone and whether the user has access to the microphone access toggle. This applies only on fully managed devices. |
deviceConnectivityManagement |
Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more. |
deviceRadioState |
Covers controls for radio state such as Wi-Fi, bluetooth, and more. |
credentialProviderPolicyDefault |
Controls which apps are allowed to act as credential providers on Android 14 and above. These apps store credentials, see this and this for details. See also |
printingPolicy |
Optional. Controls whether printing is allowed. This is supported on devices running Android 9 and above. . |
displaySettings |
Optional. Controls for the display settings. |
assistContentPolicy |
Optional. Controls whether AssistContent is allowed to be sent to a privileged app such as an assistant app. AssistContent includes screenshots and information about an app, such as package name. This is supported on Android 15 and above. |
workAccountSetupConfig |
Optional. Controls the work account setup configuration, such as details of whether a Google authenticated account is required. |
wipeDataFlags[] |
Optional. Wipe flags to indicate what data is wiped when a device or profile wipe is triggered due to any reason (for example, non-compliance). This does not apply to the |
enterpriseDisplayNameVisibility |
Optional. Controls whether the |
appFunctions |
Optional. Controls whether apps on the device for fully managed devices or in the work profile for devices with work profiles are allowed to expose app functions. |
defaultApplicationSettings[] |
Optional. The default application setting for supported types. If the default application is successfully set for at least one app type on a profile, users are prevented from changing any default applications on that profile. Only one See Default application settings guide for more details. |
ApplicationPolicy
| JSON representation |
|---|
{ "packageName": string, "installType": enum ( |
| Fields | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
packageName |
The package name of the app. For example, |
||||||||||||||||
installType |
The type of installation to perform. |
||||||||||||||||
lockTaskAllowed |
Whether the app is allowed to lock itself in full-screen mode. DEPRECATED. Use InstallType |
||||||||||||||||
defaultPermissionPolicy |
The default policy for all permissions requested by the app. If specified, this overrides the policy-level |
||||||||||||||||
permissionGrants[] |
Explicit permission grants or denials for the app. These values override the |
||||||||||||||||
managedConfiguration |
Managed configuration applied to the app. The format for the configuration is dictated by the
|
||||||||||||||||
disabled |
Whether the app is disabled. When disabled, the app data is still preserved. |
||||||||||||||||
minimumVersionCode |
The minimum version of the app that runs on the device. If set, the device attempts to update the app to at least this version code. If the app is not up-to-date, the device will contain a |
||||||||||||||||
delegatedScopes[] |
The scopes delegated to the app from Android Device Policy. These provide additional privileges for the applications they are applied to. |
||||||||||||||||
managedConfigurationTemplate |
The managed configurations template for the app, saved from the managed configurations iframe. This field is ignored if managed_configuration is set. |
||||||||||||||||
accessibleTrackIds[] |
List of the app’s track IDs that a device belonging to the enterprise can access. If the list contains multiple track IDs, devices receive the latest version among all accessible tracks. If the list contains no track IDs, devices only have access to the app’s production track. More details about each track are available in AppTrackInfo. |
||||||||||||||||
connectedWorkAndPersonalApp |
Controls whether the app can communicate with itself across a device’s work and personal profiles, subject to user consent. |
||||||||||||||||
autoUpdateMode |
Controls the auto-update mode for the app. |
||||||||||||||||
extensionConfig |
Configuration to enable this app as an extension app, with the capability of interacting with Android Device Policy offline. This field can be set for at most one app. If there is any app with The signing key certificate fingerprint of the app on the device must match one of the entries in |
||||||||||||||||
alwaysOnVpnLockdownExemption |
Specifies whether the app is allowed networking when the VPN is not connected and |
||||||||||||||||
workProfileWidgets |
Specifies whether the app installed in the work profile is allowed to add widgets to the home screen. |
||||||||||||||||
credentialProviderPolicy |
Optional. Whether the app is allowed to act as a credential provider on Android 14 and above. |
||||||||||||||||
customAppConfig |
Optional. Configuration for this custom app.
|
||||||||||||||||
installConstraint[] |
Optional. The constraints for installing the app. You can specify a maximum of one |
||||||||||||||||
installPriority |
Optional. Amongst apps with
this controls the relative priority of installation. A value of 0 (default) means this app has no priority over other apps. For values between 1 and 10,000, a lower value means a higher priority. Values outside of the range 0 to 10,000 inclusive are rejected. |
||||||||||||||||
userControlSettings |
Optional. Specifies whether user control is permitted for the app. User control includes user actions like force-stopping and clearing app data. Certain types of apps have special treatment, see |
||||||||||||||||
preferentialNetworkId |
Optional. ID of the preferential network the application uses. There must be a configuration for the specified network ID in |
||||||||||||||||
signingKeyCerts[] |
Optional. Signing key certificates of the app. This field is required in the following cases:
If this field is not set for a custom app, the policy is rejected. If it is not set when required for a non-custom app, a For other cases, this field is optional and the signing key certificates obtained from Play Store are used. See following policy settings to see how this field is used:
|
||||||||||||||||
roles[] |
Optional. Roles the app has. Apps having certain roles can be exempted from power and background execution restrictions, suspension and hibernation on Android 14 and above. The user control can also be disallowed for apps with certain roles on Android 11 and above. Refer to the documentation of each The app is notified about the roles that are set for it if the app has a notification receiver service with For the exemptions to be applied and the app to be notified about the roles, the signing key certificate fingerprint of the app on the device must match one of the signing key certificate fingerprints obtained from Play Store or one of the entries in There must not be duplicate roles with the same |
||||||||||||||||
PermissionGrant
| JSON representation |
|---|
{
"permission": string,
"policy": enum ( |
| Fields | |
|---|---|
permission |
The Android permission or group, e.g. |
policy |
The policy for granting the permission. |
Struct
| JSON representation |
|---|
{ "fields": { string: value, ... } } |
| Fields | |
|---|---|
fields |
Unordered map of dynamically typed values. An object containing a list of |
FieldsEntry
| JSON representation |
|---|
{ "key": string, "value": value } |
| Fields | |
|---|---|
key |
|
value |
|
Value
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field kind. The kind of value. kind can be only one of the following: |
|
nullValue |
Represents a null value. |
numberValue |
Represents a double value. |
stringValue |
Represents a string value. |
boolValue |
Represents a boolean value. |
structValue |
Represents a structured value. |
listValue |
Represents a repeated |
ListValue
| JSON representation |
|---|
{ "values": [ value ] } |
| Fields | |
|---|---|
values[] |
Repeated field of dynamically typed values. |
ManagedConfigurationTemplate
| JSON representation |
|---|
{ "templateId": string, "configurationVariables": { string: string, ... } } |
| Fields | |
|---|---|
templateId |
The ID of the managed configurations template. |
configurationVariables |
Optional, a map containing <key, value> configuration variables defined for the configuration. An object containing a list of |
ConfigurationVariablesEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
ExtensionConfig
| JSON representation |
|---|
{ "signingKeyFingerprintsSha256": [ string ], "notificationReceiver": string } |
| Fields | |
|---|---|
signingKeyFingerprintsSha256[] |
Hex-encoded SHA-256 hashes of the signing key certificates of the extension app. Only hexadecimal string representations of 64 characters are valid. The signing key certificate fingerprints are always obtained from the Play Store and this field is used to provide additional signing key certificate fingerprints. However, if the application is not available on the Play Store, this field needs to be set. A The signing key certificate fingerprint of the extension app on the device must match one of the signing key certificate fingerprints obtained from the Play Store or the ones provided in this field for the app to be able to communicate with Android Device Policy. In production use cases, it is recommended to leave this empty. |
notificationReceiver |
Fully qualified class name of the receiver service class for Android Device Policy to notify the extension app of any local command status updates. The service must be exported in the extension app's |
CustomAppConfig
| JSON representation |
|---|
{
"userUninstallSettings": enum ( |
| Fields | |
|---|---|
userUninstallSettings |
Optional. User uninstall settings of the custom app. |
InstallConstraint
| JSON representation |
|---|
{ "networkTypeConstraint": enum ( |
| Fields | |
|---|---|
networkTypeConstraint |
Optional. Network type constraint. |
chargingConstraint |
Optional. Charging constraint. |
deviceIdleConstraint |
Optional. Device idle constraint. |
ApplicationSigningKeyCert
| JSON representation |
|---|
{ "signingKeyCertFingerprintSha256": string } |
| Fields | |
|---|---|
signingKeyCertFingerprintSha256 |
Required. The SHA-256 hash value of the signing key certificate of the app. This must be a valid SHA-256 hash value, i.e. 32 bytes. Otherwise, the policy is rejected. A base64-encoded string. |
Role
| JSON representation |
|---|
{
"roleType": enum ( |
| Fields | |
|---|---|
roleType |
Required. The type of the role an app can have. |
PersistentPreferredActivity
| JSON representation |
|---|
{ "receiverActivity": string, "actions": [ string ], "categories": [ string ] } |
| Fields | |
|---|---|
receiverActivity |
The activity that should be the default intent handler. This should be an Android component name, e.g. |
actions[] |
The intent actions to match in the filter. If any actions are included in the filter, then an intent's action must be one of those values for it to match. If no actions are included, the intent action is ignored. |
categories[] |
The intent categories to match in the filter. An intent includes the categories that it requires, all of which must be included in the filter in order to match. In other words, adding a category to the filter has no impact on matching unless that category is specified in the intent. |
SystemUpdate
| JSON representation |
|---|
{ "type": enum ( |
| Fields | |
|---|---|
type |
The type of system update to configure. |
startMinutes |
If the type is |
endMinutes |
If the type is |
allowedDaysWithoutUpdate |
If this is greater than zero, then this is the number of days after a pending update becoming available that a device can remain compliant, without taking the update. Has no effect otherwise. |
freezePeriods[] |
An annually repeating time period in which over-the-air (OTA) system updates are postponed to freeze the OS version running on a device. To prevent freezing the device indefinitely, each freeze period must be separated by at least 60 days. |
FreezePeriod
| JSON representation |
|---|
{ "startDate": { object ( |
| Fields | |
|---|---|
startDate |
The start date (inclusive) of the freeze period. Note: |
endDate |
The end date (inclusive) of the freeze period. Must be no later than 90 days from the start date. If the end date is earlier than the start date, the freeze period is considered wrapping year-end. Note: |
Date
| JSON representation |
|---|
{ "year": integer, "month": integer, "day": integer } |
| Fields | |
|---|---|
year |
Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |
month |
Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |
day |
Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. |
StatusReportingSettings
| JSON representation |
|---|
{
"applicationReportsEnabled": boolean,
"deviceSettingsEnabled": boolean,
"softwareInfoEnabled": boolean,
"memoryInfoEnabled": boolean,
"networkInfoEnabled": boolean,
"displayInfoEnabled": boolean,
"powerManagementEventsEnabled": boolean,
"hardwareStatusEnabled": boolean,
"systemPropertiesEnabled": boolean,
"applicationReportingSettings": {
object ( |
| Fields | |
|---|---|
applicationReportsEnabled |
Whether app reports are enabled. |
deviceSettingsEnabled |
Whether device settings reporting is enabled. |
softwareInfoEnabled |
Whether software info reporting is enabled. |
memoryInfoEnabled |
Whether memory event reporting is enabled. |
networkInfoEnabled |
Whether network info reporting is enabled. |
displayInfoEnabled |
Whether displays reporting is enabled. Report data is not available for personally owned devices with work profiles. |
powerManagementEventsEnabled |
Whether power management event reporting is enabled. Report data is not available for personally owned devices with work profiles. |
hardwareStatusEnabled |
Whether hardware status reporting is enabled. Report data is not available for personally owned devices with work profiles. |
systemPropertiesEnabled |
Whether system properties reporting is enabled. |
applicationReportingSettings |
Application reporting settings. Only applicable if application_reports_enabled is true. |
commonCriteriaModeEnabled |
Whether |
defaultApplicationInfoReportingEnabled |
Optional. Whether |
ApplicationReportingSettings
| JSON representation |
|---|
{ "includeRemovedApps": boolean } |
| Fields | |
|---|---|
includeRemovedApps |
Whether removed apps are included in application reports. |
UserFacingMessage
| JSON representation |
|---|
{ "localizedMessages": { string: string, ... }, "defaultMessage": string } |
| Fields | |
|---|---|
localizedMessages |
A map containing <locale, message> pairs, where locale is a well-formed BCP 47 language code, such as en-US, es-ES, or fr. An object containing a list of |
defaultMessage |
The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided. |
LocalizedMessagesEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
PasswordRequirements
| JSON representation |
|---|
{ "passwordMinimumLength": integer, "passwordMinimumLetters": integer, "passwordMinimumLowerCase": integer, "passwordMinimumNonLetter": integer, "passwordMinimumNumeric": integer, "passwordMinimumSymbols": integer, "passwordMinimumUpperCase": integer, "passwordQuality": enum ( |
| Fields | |
|---|---|
passwordMinimumLength |
The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when |
passwordMinimumLetters |
Minimum number of letters required in the password. Only enforced when |
passwordMinimumLowerCase |
Minimum number of lower case letters required in the password. Only enforced when |
passwordMinimumNonLetter |
Minimum number of non-letter characters (numerical digits or symbols) required in the password. Only enforced when |
passwordMinimumNumeric |
Minimum number of numerical digits required in the password. Only enforced when |
passwordMinimumSymbols |
Minimum number of symbols required in the password. Only enforced when |
passwordMinimumUpperCase |
Minimum number of upper case letters required in the password. Only enforced when |
passwordQuality |
The required password quality. |
passwordHistoryLength |
The length of the password history. After setting this field, the user won't be able to enter a new password that is the same as any password in the history. A value of 0 means there is no restriction. |
maximumFailedPasswordsForWipe |
Number of incorrect device-unlock passwords that can be entered before a device is wiped. A value of 0 means there is no restriction. |
passwordExpirationTimeout |
Password expiration timeout. A duration in seconds with up to nine fractional digits, ending with ' |
passwordScope |
The scope that the password requirement applies to. |
requirePasswordUnlock |
The length of time after a device or work profile is unlocked using a strong form of authentication (password, PIN, pattern) that it can be unlocked using any other authentication method (e.g. fingerprint, trust agents, face). After the specified time period elapses, only strong forms of authentication can be used to unlock the device or work profile. |
unifiedLockSettings |
Controls whether a unified lock is allowed for the device and the work profile, on devices running Android 9 and above with a work profile. This can be set only if |
Duration
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years |
nanos |
Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 |
PackageNameList
| JSON representation |
|---|
{ "packageNames": [ string ] } |
| Fields | |
|---|---|
packageNames[] |
A list of package names. |
ProxyInfo
| JSON representation |
|---|
{ "host": string, "port": integer, "excludedHosts": [ string ], "pacUri": string } |
| Fields | |
|---|---|
host |
The host of the direct proxy. |
port |
The port of the direct proxy. |
excludedHosts[] |
For a direct proxy, the hosts for which the proxy is bypassed. The host names may contain wildcards such as *.example.com. |
pacUri |
The URI of the PAC script used to configure the proxy. |
ChoosePrivateKeyRule
| JSON representation |
|---|
{ "urlPattern": string, "packageNames": [ string ], "privateKeyAlias": string } |
| Fields | |
|---|---|
urlPattern |
The URL pattern to match against the URL of the request. If not set or empty, it matches all URLs. This uses the regular expression syntax of |
packageNames[] |
The package names to which this rule applies. The signing key certificate fingerprint of the app is verified against the signing key certificate fingerprints provided by Play Store and |
privateKeyAlias |
The alias of the private key to be used. |
AlwaysOnVpnPackage
| JSON representation |
|---|
{ "packageName": string, "lockdownEnabled": boolean } |
| Fields | |
|---|---|
packageName |
The package name of the VPN app. |
lockdownEnabled |
Disallows networking when the VPN is not connected. |
ComplianceRule
| JSON representation |
|---|
{ "disableApps": boolean, "packageNamesToDisable": [ string ], // Union field |
| Fields | |
|---|---|
disableApps |
If set to true, the rule includes a mitigating action to disable apps so that the device is effectively disabled, but app data is preserved. If the device is running an app in locked task mode, the app will be closed and a UI showing the reason for non-compliance will be displayed. |
packageNamesToDisable[] |
If set, the rule includes a mitigating action to disable apps specified in the list, but app data is preserved. |
Union field condition. The condition, which when satisfied, triggers the mitigating actions defined in the rule. Exactly one of the conditions must be set. condition can be only one of the following: |
|
nonComplianceDetailCondition |
A condition which is satisfied if there exists any matching |
apiLevelCondition |
A condition which is satisfied if the Android Framework API level on the device doesn't meet a minimum requirement. |
NonComplianceDetailCondition
| JSON representation |
|---|
{
"settingName": string,
"nonComplianceReason": enum ( |
| Fields | |
|---|---|
settingName |
The name of the policy setting. This is the JSON field name of a top-level |
nonComplianceReason |
The reason the device is not in compliance with the setting. If not set, then this condition matches any reason. |
packageName |
The package name of the app that's out of compliance. If not set, then this condition matches any package name. |
ApiLevelCondition
| JSON representation |
|---|
{ "minApiLevel": integer } |
| Fields | |
|---|---|
minApiLevel |
The minimum desired Android Framework API level. If the device doesn't meet the minimum requirement, this condition is satisfied. Must be greater than zero. |
SetupAction
| JSON representation |
|---|
{ "title": { object ( |
| Fields | |
|---|---|
title |
Title of this action. |
description |
Description of this action. |
Union field action. The action to execute during setup. action can be only one of the following: |
|
launchApp |
An action to launch an app. The app will be launched with an intent containing an extra with key |
LaunchAppAction
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field
|
|
packageName |
Package name of app to be launched |
PolicyEnforcementRule
| JSON representation |
|---|
{ "blockAction": { object ( |
| Fields | |
|---|---|
blockAction |
An action to block access to apps and data on a company owned device or in a work profile. This action also triggers a user-facing notification with information (where possible) on how to correct the compliance issue. Note: |
wipeAction |
An action to reset a company owned device or delete a work profile. Note: |
Union field trigger. Condition which will trigger this rule. trigger can be only one of the following: |
|
settingName |
The top-level policy to enforce. For example, |
BlockAction
| JSON representation |
|---|
{
"blockAfterDays": integer,
"blockScope": enum ( |
| Fields | |
|---|---|
blockAfterDays |
Number of days the policy is non-compliant before the device or work profile is blocked. To block access immediately, set to 0. |
blockScope |
Specifies the scope of this |
WipeAction
| JSON representation |
|---|
{ "wipeAfterDays": integer, "preserveFrp": boolean } |
| Fields | |
|---|---|
wipeAfterDays |
Number of days the policy is non-compliant before the device or work profile is wiped. |
preserveFrp |
Whether the factory-reset protection data is preserved on the device. This setting doesn’t apply to work profiles. |
KioskCustomization
| JSON representation |
|---|
{ "powerButtonActions": enum ( |
| Fields | |
|---|---|
powerButtonActions |
Sets the behavior of a device in kiosk mode when a user presses and holds (long-presses) the Power button. |
systemErrorWarnings |
Specifies whether system error dialogs for crashed or unresponsive apps are blocked in kiosk mode. When blocked, the system will force-stop the app as if the user chooses the "close app" option on the UI. |
systemNavigation |
Specifies which navigation features are enabled (e.g. Home, Overview buttons) in kiosk mode. |
statusBar |
Specifies whether system info and notifications are disabled in kiosk mode. |
deviceSettings |
Specifies whether the Settings app is allowed in kiosk mode. |
AdvancedSecurityOverrides
| JSON representation |
|---|
{ "untrustedAppsPolicy": enum ( |
| Fields | |
|---|---|
untrustedAppsPolicy |
The policy for untrusted apps (apps from unknown sources) enforced on the device. Replaces |
googlePlayProtectVerifyApps |
Whether Google Play Protect verification is enforced. Replaces |
developerSettings |
Controls access to developer settings: developer options and safe boot. Replaces |
commonCriteriaMode |
Controls Common Criteria Mode—security standards defined in the Common Criteria for Information Technology Security Evaluation (CC). Enabling Common Criteria Mode increases certain security components on a device, see Warning: Common Criteria Mode enforces a strict security model typically only required for IT products used in national security systems and other highly sensitive organizations. Standard device use may be affected. Only enabled if required. If Common Criteria Mode is turned off after being enabled previously, all user-configured Wi-Fi networks may be lost and any enterprise-configured Wi-Fi networks that require user input may need to be reconfigured. |
personalAppsThatCanReadWorkNotifications[] |
Personal apps that can read work profile notifications using a NotificationListenerService. By default, no personal apps (aside from system apps) can read work notifications. Each value in the list must be a package name. |
mtePolicy |
Optional. Controls Memory Tagging Extension (MTE) on the device. The device needs to be rebooted to apply changes to the MTE policy. On Android 15 and above, a |
contentProtectionPolicy |
Optional. Controls whether content protection, which scans for deceptive apps, is enabled. This is supported on Android 15 and above. |
PersonalUsagePolicies
| JSON representation |
|---|
{ "cameraDisabled": boolean, "screenCaptureDisabled": boolean, "accountTypesWithManagementDisabled": [ string ], "maxDaysWithWorkOff": integer, "personalPlayStoreMode": enum ( |
| Fields | |
|---|---|
cameraDisabled |
If true, the camera is disabled on the personal profile. |
screenCaptureDisabled |
If true, screen capture is disabled for all users. |
accountTypesWithManagementDisabled[] |
Account types that can't be managed by the user. |
maxDaysWithWorkOff |
Controls how long the work profile can stay off. The minimum duration must be at least 3 days. Other details are as follows:
|
personalPlayStoreMode |
Used together with |
personalApplications[] |
Policy applied to applications in the personal profile. |
privateSpacePolicy |
Optional. Controls whether a private space is allowed on the device. |
bluetoothSharing |
Optional. Whether bluetooth sharing is allowed. |
PersonalApplicationPolicy
| JSON representation |
|---|
{
"packageName": string,
"installType": enum ( |
| Fields | |
|---|---|
packageName |
The package name of the application. |
installType |
The type of installation to perform. |
OncCertificateProvider
| JSON representation |
|---|
{ "certificateReferences": [ string ], // Union field |
| Fields | |
|---|---|
certificateReferences[] |
This feature is not generally available. |
Union field This feature is not generally available. |
|
contentProviderEndpoint |
This feature is not generally available. |
ContentProviderEndpoint
| JSON representation |
|---|
{ "uri": string, "packageName": string, "signingCertsSha256": [ string ] } |
| Fields | |
|---|---|
uri |
This feature is not generally available. |
packageName |
This feature is not generally available. |
signingCertsSha256[] |
Required. This feature is not generally available. |
CrossProfilePolicies
| JSON representation |
|---|
{ "showWorkContactsInPersonalProfile": enum ( |
| Fields | |
|---|---|
showWorkContactsInPersonalProfile |
Whether personal apps can access contacts stored in the work profile. See also |
crossProfileCopyPaste |
Whether text copied from one profile (personal or work) can be pasted in the other profile. |
crossProfileDataSharing |
Whether data from one profile (personal or work) can be shared with apps in the other profile. Specifically controls simple data sharing via intents. Management of other cross-profile communication channels, such as contact search, copy/paste, or connected work & personal apps, are configured separately. |
workProfileWidgetsDefault |
Specifies the default behaviour for work profile widgets. If the policy does not specify |
crossProfileAppFunctions |
Optional. Controls whether personal profile apps can invoke app functions exposed by apps in the work profile. |
exemptionsToShowWorkContactsInPersonalProfile |
List of apps which are excluded from the
Supported on Android 14 and above. A |
UsageLog
| JSON representation |
|---|
{ "enabledLogTypes": [ enum ( |
| Fields | |
|---|---|
enabledLogTypes[] |
Specifies which log types are enabled. Note that users will receive on-device messaging when usage logging is enabled. |
uploadOnCellularAllowed[] |
Specifies which of the enabled log types can be uploaded over mobile data. By default logs are queued for upload when the device connects to WiFi. |
DeviceConnectivityManagement
| JSON representation |
|---|
{ "usbDataAccess": enum ( |
| Fields | |
|---|---|
usbDataAccess |
Controls what files and/or data can be transferred via USB. Supported only on company-owned devices. |
configureWifi |
Controls Wi-Fi configuring privileges. Based on the option set, user will have either full or limited or no control in configuring Wi-Fi networks. |
wifiDirectSettings |
Controls configuring and using Wi-Fi direct settings. Supported on company-owned devices running Android 13 and above. |
tetheringSettings |
Controls tethering settings. Based on the value set, the user is partially or fully disallowed from using different forms of tethering. |
wifiSsidPolicy |
Restrictions on which Wi-Fi SSIDs the device can connect to. Note that this does not affect which networks can be configured on the device. Supported on company-owned devices running Android 13 and above. |
wifiRoamingPolicy |
Optional. Wi-Fi roaming policy. |
bluetoothSharing |
Optional. Controls whether Bluetooth sharing is allowed. |
preferentialNetworkServiceSettings |
Optional. Preferential network service configuration. Setting this field will override |
apnPolicy |
Optional. Access Point Name (APN) policy. Configuration for Access Point Names (APNs) which may override any other APNs on the device. See |
WifiSsidPolicy
| JSON representation |
|---|
{ "wifiSsidPolicyType": enum ( |
| Fields | |
|---|---|
wifiSsidPolicyType |
Type of the Wi-Fi SSID policy to be applied. |
wifiSsids[] |
Optional. List of Wi-Fi SSIDs that should be applied in the policy. This field must be non-empty when WifiSsidPolicyType is set to |
WifiSsid
| JSON representation |
|---|
{ "wifiSsid": string } |
| Fields | |
|---|---|
wifiSsid |
Required. Wi-Fi SSID represented as a string. |
WifiRoamingPolicy
| JSON representation |
|---|
{
"wifiRoamingSettings": [
{
object ( |
| Fields | |
|---|---|
wifiRoamingSettings[] |
Optional. Wi-Fi roaming settings. SSIDs provided in this list must be unique, the policy will be rejected otherwise. |
WifiRoamingSetting
| JSON representation |
|---|
{
"wifiSsid": string,
"wifiRoamingMode": enum ( |
| Fields | |
|---|---|
wifiSsid |
Required. SSID of the Wi-Fi network. |
wifiRoamingMode |
Required. Wi-Fi roaming mode for the specified SSID. |
PreferentialNetworkServiceSettings
| JSON representation |
|---|
{ "preferentialNetworkServiceConfigs": [ { object ( |
| Fields | |
|---|---|
preferentialNetworkServiceConfigs[] |
Required. Preferential network service configurations which enables having multiple enterprise slices. There must not be multiple configurations with the same |
defaultPreferentialNetworkId |
Required. Default preferential network ID for the applications that are not in
|
PreferentialNetworkServiceConfig
| JSON representation |
|---|
{ "preferentialNetworkId": enum ( |
| Fields | |
|---|---|
preferentialNetworkId |
Required. Preferential network identifier. This must not be set to |
fallbackToDefaultConnection |
Optional. Whether fallback to the device-wide default network is allowed. If this is set to |
nonMatchingNetworks |
Optional. Whether apps this configuration applies to are blocked from using networks other than the preferential service. If this is set to |
ApnPolicy
| JSON representation |
|---|
{ "overrideApns": enum ( |
| Fields | |
|---|---|
overrideApns |
Optional. Whether override APNs are disabled or enabled. See |
apnSettings[] |
Optional. APN settings for override APNs. There must not be any conflict between any of APN settings provided, otherwise the policy will be rejected. Two |
ApnSetting
| JSON representation |
|---|
{ "apnTypes": [ enum ( |
| Fields | |
|---|---|
apnTypes[] |
Required. Usage categories for the APN. Policy will be rejected if this field is empty or contains |
apn |
Required. Name of the APN. Policy will be rejected if this field is empty. |
displayName |
Required. Human-readable name that describes the APN. Policy will be rejected if this field is empty. |
alwaysOnSetting |
Optional. Whether User Plane resources have to be activated during every transition from CM-IDLE mode to CM-CONNECTED state for this APN. See 3GPP TS 23.501 section 5.6.13. |
authType |
Optional. Authentication type of the APN. |
carrierId |
Optional. Carrier ID for the APN. A value of 0 (default) means not set and negative values are rejected. |
mmsProxyAddress |
Optional. MMS (Multimedia Messaging Service) proxy address of the APN which can be an IP address or hostname (not a URL). |
mmsProxyPort |
Optional. MMS (Multimedia Messaging Service) proxy port of the APN. A value of 0 (default) means not set and negative values are rejected. |
mmsc |
Optional. MMSC (Multimedia Messaging Service Center) URI of the APN. |
mtuV4 |
Optional. The default MTU (Maximum Transmission Unit) size in bytes of the IPv4 routes brought up by this APN setting. A value of 0 (default) means not set and negative values are rejected. Supported on Android 13 and above. A |
mtuV6 |
Optional. The MTU (Maximum Transmission Unit) size of the IPv6 mobile interface to which the APN connected. A value of 0 (default) means not set and negative values are rejected. Supported on Android 13 and above. A |
mvnoType |
Optional. MVNO match type for the APN. |
networkTypes[] |
Optional. Radio technologies (network types) the APN may use. Policy will be rejected if this field contains |
username |
Optional. APN username of the APN. |
password |
Optional. APN password of the APN. |
numericOperatorId |
Optional. The numeric operator ID of the APN. Numeric operator ID is defined as MCC (Mobile Country Code) + MNC (Mobile Network Code). |
protocol |
Optional. The protocol to use to connect to this APN. |
roamingProtocol |
Optional. The protocol to use to connect to this APN while the device is roaming. |
proxyAddress |
Optional. The proxy address of the APN. |
proxyPort |
Optional. The proxy port of the APN. A value of 0 (default) means not set and negative values are rejected. |
DeviceRadioState
| JSON representation |
|---|
{ "wifiState": enum ( |
| Fields | |
|---|---|
wifiState |
Controls current state of Wi-Fi and if user can change its state. |
airplaneModeState |
Controls whether airplane mode can be toggled by the user or not. |
ultraWidebandState |
Controls the state of the ultra wideband setting and whether the user can toggle it on or off. |
cellularTwoGState |
Controls whether cellular 2G setting can be toggled by the user or not. |
minimumWifiSecurityLevel |
The minimum required security level of Wi-Fi networks that the device can connect to. |
userInitiatedAddEsimSettings |
Optional. Controls whether the user is allowed to add eSIM profiles. |
DisplaySettings
| JSON representation |
|---|
{ "screenBrightnessSettings": { object ( |
| Fields | |
|---|---|
screenBrightnessSettings |
Optional. Controls the screen brightness settings. |
screenTimeoutSettings |
Optional. Controls the screen timeout settings. |
ScreenBrightnessSettings
| JSON representation |
|---|
{
"screenBrightnessMode": enum ( |
| Fields | |
|---|---|
screenBrightnessMode |
Optional. Controls the screen brightness mode. |
screenBrightness |
Optional. The screen brightness between 1 and 255 where 1 is the lowest and 255 is the highest brightness. A value of 0 (default) means no screen brightness set. Any other value is rejected. |
ScreenTimeoutSettings
| JSON representation |
|---|
{
"screenTimeoutMode": enum ( |
| Fields | |
|---|---|
screenTimeoutMode |
Optional. Controls whether the user is allowed to configure the screen timeout. |
screenTimeout |
Optional. Controls the screen timeout duration. The screen timeout duration must be greater than 0, otherwise it is rejected. Additionally, it should not be greater than A duration in seconds with up to nine fractional digits, ending with ' |
WorkAccountSetupConfig
| JSON representation |
|---|
{
"authenticationType": enum ( |
| Fields | |
|---|---|
authenticationType |
Optional. The authentication type of the user on the device. |
requiredAccountEmail |
Optional. The specific google work account email address to be added. This field is only relevant if |
DefaultApplicationSetting
| JSON representation |
|---|
{ "defaultApplicationType": enum ( |
| Fields | |
|---|---|
defaultApplicationType |
Required. The app type to set the default application. |
defaultApplications[] |
Required. The list of applications that can be set as the default app for a given type. This list must not be empty or contain duplicates. The first app in the list that is installed and qualified for the If the A When applying to |
defaultApplicationScopes[] |
Required. The scopes to which the policy should be applied. This list must not be empty or contain duplicates. A |
DefaultApplication
| JSON representation |
|---|
{ "packageName": string } |
| Fields | |
|---|---|
packageName |
Required. The package name that should be set as the default application. The policy is rejected if the package name is invalid. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌