1. Home
  2. Knowledge Base
  3. SureMDM
  4. General questions
  5. How to Delete Older SureMDM Inbox Messages as Admin and Prevent End Users from Deleting Messages on Android Devices
  1. Home
  2. Knowledge Base
  3. SureMDM
  4. How to Delete Older SureMDM Inbox Messages as Admin and Prevent End Users from Deleting Messages on Android Devices

How to Delete Older SureMDM Inbox Messages as Admin and Prevent End Users from Deleting Messages on Android Devices

Admins now have control over message management within the SureMDM Agent inbox. This article explains how admins can manually and automatically delete messages, as well as prevent end users from deleting messages on their devices.

Purpose


This functionality ensures better control over device communication by allowing only admins to delete messages from the SureMDM Agent inbox. It enhances accountability and prevents unauthorized message removal by end users.

Prerequisites

  1. Access to SureMDM agent settings on the device and SureMDM console
  2. SureMDM Agent >= 27.52.66

Steps

Steps to manually Disable Users from deleting the Messages:

  1. Launch the SureMDM Agent application
  2. Tap on the Settings → User Privacy → Disable “ Delete” Button should be enabled.
  3. The Delete option in the Inbox will be hidden, preventing end users from deleting messages.

Steps to enable the “Disable Delete Button” Option Using a RunScript Job

To enable the “Disable Delete Button” option on Android devices using a RunScript job, navigate to Jobs → New Job → Android → RunScript. In the RunScript editor, copy and paste the following script:

!#suremdm

hideDeleteButton(true)

Ensure to remove any extra spaces before or after the script, then save the job. Once saved, the job will be listed under the Jobs section. You can then apply this job to the desired device(s), which will automatically enable the “Disable Delete Button” option on those devices.

Steps to manually Delete Older SureMDM Inbox Messages:

  1. Launch the SureMDM Agent application.
  2. Tap on the Settings → Advanced settings → “Enable Delete Older Messages”, should be enabled.
  3. Tap on “Delete Messages Older Than” and enter a value between 1 and 365. Messages older than the specified number of days will be deleted automatically.

Steps to enable “Enable Delete Older Messages” and set the days for “Delete Messages Older Than”  using a runscript job

To enable this feature using a RunScript job, navigate to Jobs → New Job → Android → RunScript. In the RunScript editor, copy and paste the following script:

!#suremdm

setAutoDeleteOldMessages(true, N)

Replace N with the number of days after which messages should be deleted. The valid range for N is from 1 to 365.

Ensure there are no extra spaces before or after the script, then save the job. Once saved, it will appear in the Jobs section. You can then apply this job to the desired device(s), and the Delete Older Messages option will be enabled as configured.

The screenshot below shows the impact on the device after deploying the run script that deletes messages older than one day. Following the deployment…

Need more help? Here’s how to get help from our experts. 

CONTACT US

Was this helpful?
YesNo
Updated on April 2026
Need Support?
Can't find the answer you're looking for?
Contact Support