+ Start a Discussion
Shukla_AnkitShukla_Ankit 

Get Mac Address

Hi All,

 

How can we get MAC address of the local system by the apex code or any other way?????

I know that by getHeaders(); method we get IP address but I want to get MAC address.

 

Thanks in advance.

 

Thanks 

Ankit

Ashish_SFDCAshish_SFDC

Hi Ankit, 

 

Currently we do not have an option to get MAC Address using APEX.

You can try integrating with Javascript code below,  

http://stackoverflow.com/questions/16556700/how-to-get-client-mac-address-by-using-javascript

Please vote for the Idea for the same request: https://success.salesforce.com/ideaView?id=08730000000Bqcj

 

Regards,

Ashish

If your question is answered, please mark this post as solved. 

 

sfdcfoxsfdcfox

In summary, you have to convince the local machine to tell the server to do so. This requires hardware access, such as in Java with a signed applet, or with ActiveX. TCP/IP doesn't expose the MAC in its headers, so there's no way for salesforce.com to accurately access the MAC directly. Also, a single computer often has multiple MACs, such as Bluetooth, 802.11a/b/g/n, and/or 10/100/1000/10000BaseT. With multiplexing, the MAC might even change between one or more values in a single transaction.