Loading
Salesforce Enforces New Security Requirements in Summer 2026Read More
Secure Your Salesforce Org
View Devices with Mobile Device Tracking

View Devices with Mobile Device Tracking

You can view devices using REST API, SOQL queries in Apex, or any other method that you use to interact with sObjects.

Required Editions

Available in: Enterprise, Performance, Unlimited, and Developer Editions
User Permissions Needed
To view user devices that access Salesforce: View Devices

Devices are exposed in the UserDevice and UserDeviceApplication sObjects. Use UserDevice to represent information that is unique to a device. Use UserDeviceApplication to represent information about applications installed on a device that is accessing Salesforce.

The device operating system provides a unique identifier that’s used to create the UserDevice object. iOS provides information that results in one UserDevice created for each combination of user and iOS app vendor. For example, if an iOS user installed the Salesforce App and the Salesforce Events app, one UserDevice is created because both apps are provided by Salesforce. Android provides information that results in a UserDevice created for each user and Android App. So if an Android user installs the Salesforce App and the Salesforce Events app, two UserDevice objects are created.

Note
Note The mobile device operating system doesn’t provide the International Mobile Equipment Identity (IMEI) number to the Salesforce API.

See UserDevice and UserDeviceApplication in the Object Reference for Salesforce and Lightning Platform Developer Documentation.

Example
Example

This REST API call retrieves all devices that have accessed your Salesforce org.

GET /services/data/v50.0/query/?q=SELECT+ID,DEVICETYPE,USER.USERNAME,LASTLOGINHISTORY.LOGINTIME+FROM+USERDEVICE

This REST API call retrieves only iOS devices that have accessed your org.

GET /services/data/v50.0/query/?q=SELECT+ID,User.Name+FROM+USERDEVICE+WHERE+PLATFORMTYPE='iOS'
 
Loading
Salesforce Help | Article