function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arun JoseArun Jose 

How to identify the device id or the unique id of a mobile device when user logs in through the Salesforce mobile application

SubratSubrat (Salesforce Developers) 
Hello Arun ,

I cam across a discussion which might help you with your requireement -> https://salesforce.stackexchange.com/questions/295190/how-to-link-the-device-id-to-the-right-contact-in-sfmc-and-be-able-to-trigger-pe

Hope this helps !
Thank you.
carry lordcarry lord
to identify the unique device id when a user logs in through the salesforce mobile application , you can use the mobile SDK  provided by
Salesforce. The Mobile SDK offers a feature called "Device ID" that can be utilized to retrieve the unique identifier of a mobile device. Here's a general approach to obtain the device ID:
Set up Salesforce Mobile SDK: Start by setting up and integrating the Salesforce Mobile SDK into your mobile application. Refer to the Salesforce Mobile SDK documentation for detailed instructions specific to your development platform (iOS or Android).
Retrieve the Device ID: Once the SDK is integrated, you can use the Salesforce SDK APIs to retrieve the device ID. The exact method to obtain the device ID may vary depending on the SDK version and platform. Here are some general steps:
In your mobile app code, import the necessary Salesforce SDK classes and modules.
Use the appropriate SDK method to retrieve the device ID. For example, in iOS, you can use SFUserAccountManager.shared().currentUser?.credentials.deviceId to access the device ID.
Store or use the retrieved device ID as needed in your application logic. Official Site (https://www.mymilestonecard.biz/)
Handle Permissions: Keep in mind that accessing the device ID may require specific permissions depending on the platform and SDK version. Make sure your app's permissions and configurations are properly set to access device information.
Arun Kumar 1141Arun Kumar 1141
Hello Arun Jose,

In order to prioritise user privacy and security, Salesforce does not expose the device ID or any unique identifier of a mobile device directly within the Salesforce mobile application. This approach is taken to adhere to best practices and comply with privacy regulations. Salesforce focuses on maintaining the confidentiality of user data and does not provide an out-of-the-box feature to retrieve or access the device ID of a mobile device when a user logs in through the mobile application.

If you have a specific business requirement that necessitates device identification or tracking, it is advisable to thoroughly review Salesforce documentation, consult the Salesforce Trailblazer Community, or engage with Salesforce support to explore potential solutions or workarounds within the boundaries of privacy and security regulations.

By adopting these recommended practices, you can ensure the protection of user data and maintain a secure environment while leveraging the capabilities of the Salesforce mobile application.

Mark it as best answer, if this helps you.
Thanks.
Shuvam PatraShuvam Patra

Yes, you're spot on! Salesforce indeed prioritizes user privacy and security, hence it doesn't provide a direct way to access a mobile device's unique ID via the Salesforce mobile app. The focus is on keeping user data confidential and secure.

If you need to identify or track devices for a specific business purpose, you should look into Salesforce's documentation, tap into the knowledge of the Trailblazer Community, (https://trailhead.salesforce.com/en/trailblazercommunity) or seek assistance from Salesforce support (https://trailhead.salesforce.com/help). They could help explore potential solutions or workarounds, always considering privacy and security regulations.

cory graycory gray
Thansk for sharing this amazing article  (https://buyozempiconlineuk.com/)