Get Unique Device ID (UDID) under Windows Phone 8
I haven't yet started to develop for Windows Phone 8, still on 7, but you still should be able to use the original DeviceExtendedProperties class to pull back the Device Unique ID.
DeviceExtendedProperties.GetValue("DeviceUniqueId")
There's a twist to this DeviceUniqueId - it is unique only for one publisher. So it is not really device-wide unique identifier but unique device id for one publisher. We have noticed when we worked on some customer project where we tried to identify the same phone from different accounts (customer publishes under two different accounts).
I've had this issue with returning the null value. Then remembered that it needs to be switched on.
In WMAppManifest.xml
-> Capabilities
tab -> switch on ID_CAP_IDENTITY_DEVICE