Newer Version Available

This content describes an older version of this product. View Latest

MobileSecurityPolicy

Represents a mobile app security policy on the Salesforce mobile app with Enhanced Mobile App Security enabled. For a full description of each policy, see Enable and Configure Mobile App Security Policies.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

Parent Type

This type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location

MobileSecurityPolicy components have the suffix .mobileSecurityPolicy and are stored in the mobileSecurityPolicies folder.

Version

MobileSecurityPolicy components are available in API version 53.0 and later.

Special Access Rules

The Enhanced Mobile App Security add-on subscription and the Enforce Enhanced Mobile App Security user permission are required to use this metadata type.

Fields

Field Name Description
effectiveDate
Field Type
dateTime
Description
The date that a mobile security policy is enforced.
isEnabled
Field Type
boolean
Description

Required. Indicates whether the mobile security policy is enabled. The default value is false, which means that the policy is disabled.

isProtected
Field Type
boolean
Description
An auto-generated value that doesn’t impact the behavior of the metadata type. The default value is false.
masterLabel
Field Type
string
Description

Required. ​​A user-friendly name for MobileSecurityPolicy, which is defined when the MobileSecurityPolicy component is created.

mobilePlatform
Field Type
MobileSecurityMobilePlatform (enumeration of type string)
Description
The mobile operating system of the mobile security policy.

Values are:

  • Android
  • iOS
mobileSecurityAssignment
Field Type
string
Description
The name of the mobile security assignment associated with the mobile security policy. See MobileSecurityAssignment.
ruleValue
Field Type
string
Description

Required. The value of the mobile security policy rule.

ruleValueType
Field Type
MobileSecurityPolicyRuleValueType (enumeration of type string)
Description

Required. The type of mobile security policy rule.

Values are:

  • Boolean
  • Text
  • TextList
severityLevel
Field Type
MobileSecurityPolicySeverityLevel (enumeration of type string)
Description

Required. The severity level of a mobile security policy.

Values are:

  • Critical— Wipes app data and logs user out
  • Error—Blocks access to the app until the issue is resolved, but doesn’t log user out
  • Info— Blocks prohibited action or logs user action and informs user
  • Warn—Notifies the user of the violation and recommends how to resolve, but user is able to continue using the app
type
Field Type
MobileSecurityPolicyType (enumeration of type string)
Description

Required. The type of mobile security policy.

Values are:

  • AllowedDeviceList
  • Block3dTouch
  • BlockCalendar
  • BlockCamera
  • BlockContacts
  • BlockCustomKeyboard
  • BlockFileBackup
  • BlockMicrophone
  • BlockOsSharing
  • BlockedDeviceList
  • BrowserUriScheme
  • CheckBiometric
  • DevicePasscode
  • DisableUrlCaching
  • JailbrokenDevice
  • LogCertPin
  • LogEmail
  • LogPhonecall
  • LogPolicyResult
  • LogScreenshot
  • LogTextmessage
  • LogoutAfterRestart
  • LogoutOnBiometricChange
  • MalwareDetection
  • ManInMiddle
  • MaxOffline
  • MaximumAppVersion
  • MaximumOsVersion
  • MinimumAppVersion
  • MinimumOsVersion
  • MinimumSecurityPatchVersion
  • MininumAppVersion
  • PhonecallUriScheme
  • Screenshot

Declarative Metadata Sample Definition

The following is an example of a MobileSecurityPolicy component.

1<?xml version="1.0" encoding="UTF-8"?>
2<MobileSecurityPolicy xmlns="http://soap.sforce.com/2006/04/metadata">
3    <effectiveDate>2022-08-09T22:04:56.000Z</effectiveDate>
4    <isEnabled>true</isEnabled>
5    <isProtected>false</isProtected>
6    <masterLabel>MyMobileSecurityPolicy</masterLabel>
7    <mobileSecurityAssignment>MyMobileSecurityAssignment</mobileSecurityAssignment>
8    <ruleValue>true</ruleValue>
9    <ruleValueType>Boolean</ruleValueType>
10    <severityLevel>info</severityLevel>
11    <type>BlockCalendar</type>
12    <mobilePlatform>Android</mobilePlatform>
13</MobileSecurityPolicy>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>*</members>
5        <name>MobileSecurityPolicy</name>
6    </types>
7    <version>61.0</version>
8</Package>

Wildcard Support in the Manifest File

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.