1. Home
  2. Knowledge Base
  3. How to Fetch SIM MCC and MNC Values via Custom Column 

How to Fetch SIM MCC and MNC Values via Custom Column 

Purpose



Administrators can now use custom JavaScript execution to dynamically retrieve the Mobile Country Code (MCC) and Mobile Network Code (MNC) values for both SIM1 and SIM2 slots. This data can be automatically mapped to update custom property columns in the console.

Prerequisites

Device supports SIM

Steps

To create Custom Properties, follow these steps:

  1. Navigate to SureMDM Web Console > Settings > Account Settings > Device Properties > Properties > Custom Device Properties
  2. Click on Add
  3. Select Platform -> Android 
  4. Select Datatype as String
  5. Enable Retrieve Value from Script, add the below scripts to fetch MCC and MNC Value

A. Script to fetch MCC value:

function assignValue(){

var finalValue = suremdmjs.getMccMncValue(“mcc”,0);

return finalValue;

}

B. Script to fetch MNC Value:

function assignValue(){

var finalValue = suremdmjs.getMccMncValue(“mnc”,1);

return finalValue;

}

6. Set the frequency as per your requirement.

7. Tap on OK

To Create Custom Column: On the SureMDM console navigate to Column grid > Custom columns > Add custom column.
The required column can now be added and Save it. The MCC and MNC data would now be visible for devices on the console

Conclusion

By configuring custom device properties and custom columns, administrators can automatically retrieve and display SIM Mobile Country Code (MCC) and Mobile Network Code (MNC) values directly in the SureMDM console. This enables better visibility into carrier information for both SIM slots, simplifies device inventory management, and helps with network identification, reporting, and troubleshooting without requiring manual intervention.

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

CONTACT US

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