Can we get CPU type anywhere?

We're implementing an MDM system and would like to know if we can get the type of CPU for an enrolled device, I know we can use IsAppleSilicon from the Device Information command but it would be good to know if it's an M1, M2, M3 etc.

We can implement a mapping of product name to CPU type, e.g. Mac16,1 has an M4 chip but this would mean ongoing maintenance that we'd prefer to avoid.

Is there a public web API (ideally first-party provided by Apple) that can be used to lookup details of a device by product name or similar?

Slightly related is the Declarative Device Management documentation for StatusDeviceModelMarketingName offers an alternative of:

use device.model.configuration-code to look up the marketing name through the web API

but doesn't mention which web API.

Try sysctlbyname with "machdep.cpu.brand_string"

Apple does not provide any machine-readable source for that information.

You're definitely not the only person to run into this problem, and others go through the effort of collecting and maintaining this information. I don't know whether any of them would be willing to share or license this information, but it might be worth investigating.

Slightly related is the Declarative Device Management documentation for StatusDeviceModelMarketingName offers an alternative of:

use device.model.configuration-code to look up the marketing name through the web API

but doesn't mention which web API.

That documentation is in error. There is no device.model.configuration-code status. There's no documented web API either. The site it is referring to is no longer updated, and I'm not sure it had the information you're seeking anyway.

Can we get CPU type anywhere?
 
 
Q