A Photon 1 or P1 has a MAC address format of: e0:4f:43:xx:xx:xx (Universal Global Scientific Industrial Co., Ltd.).
This won't help for Gen 2 devices, but Gen 3 and later devices the MAC address is stored in the cloud. I did not find the MAC address in the console or the CLI, but if you know the Device ID you can use the Get Device Info Tool or the equivalent cloud API call and it should list the MAC addresses (there's one for Wi-Fi and one for BLE).
If you can connect the device by USB to a computer with the Particle CLI, particle serial mac can be used.
Not sure when it was removed, but you can no longer get a Photon 1 mac from the CLI or getDevice().
The CLI returns Could not identify device: Could not get MAC address: Not supported even though it had worked previously, and getDevice() doesn't return the mac_wifi field.
Can this be brought back to the CLI? I suppose i can find a previous version that worked and use that too, but it's disappointing that features get removed and I have to modify my manufacturing scripts. Now I see that there's a new option to prevent it from updating and lock it to a specific version so I should probably use that. github diff
The reason is that the old CLI connected to the device in USB CDC (serial terminal mode) and typed commands at it. This required being in listening mode, and also failed if the device was logging data by serial debug.
The current CLI uses USB control requests which does not require listening mode and is unaffected by serial debug output. Older devices do not support all of these requests, however.