Alternate Way of getting the Unique DeviceId in Windows Phone 8

The Windows Phone 8 SDK provides the PublisherHostId defined in the HostInformation class which can be used to get the Unique DeviceId in Windows Phone which is specific to the publisher.

Alternate Way of getting the Unique DeviceId in Windows Phone 8

Below is a sample code snippet demonstrating how to get the Unique DeviceId in Windows Phone 8 using PublicherHostId.

var UniqueID = Windows.Phone.System.Analytics.HostInformation.PublisherHostId;

MessageBox.Show(UniqueID);

Note that the access PublisherHostId requires ID_CAP_IDENTIY_DEVICE to be defined in the manifest.

Alternate Way of getting the Unique DeviceId in Windows Phone 8
%d