This blog post was authored by Joao Lucas Guberman Raza, a program manager on the Windows Phone team.
ANID (anonymous ID) and ANID2 are hashed representations of the Microsoft account the user has entered on the device. ANID and ANID2 refer to the string values returned by UserExtendedProperties.GetValue("ANID") and UserExtendedProperties.GetValue("ANID2"). ANID is available to Windows Phone 7.5 developers. In Windows Phone 8, we have deprecated ANID and replaced it with ANID2. ANID2 is still a hashed representation of the user’s Microsoft account, but it is also specific to each app publisher.
In the ANID2 model, Windows Phone 8 apps built by different app publishers have different ANID2 values, even if they are run on a device with the same Microsoft account. Windows Phone 8 apps built by the same app publisher have the same ANID2 value when running on a phone associated with the same Microsoft account. Note that this only applies to 8.0 apps running on Windows Phone 8—Windows Phone 7 apps running on Windows Phone 8 continue to use the ANID model.
If you are building an app targeting Windows Phone 7.5, you can continue to use ANID, but you must keep in mind that it is no longer supported for Windows Phone 8 apps.
Because ANID has been deprecated in favor of ANID2, this can cause problems for developers who have published apps that rely on ANID data. To address this concern, in this post we discuss how you can migrate ANID to ANID2.
Note that the string returned by DeviceExtendedProperties.GetValue("DeviceUniqueID") is also publisher-specific on Windows Phone 8. However, unlike ANID, there is no migration story to correlate non publisher-specific DeviceUniqueID values with publisher-specific DeviceUniqueIDvalues. In order to make sure your app works correctly on Windows Phone 8, be sure to test it on 8.0 devices.
If you have stored sets of ANID data and you want to migrate that data to the new ANID2 model, do the following steps:
Run the tool as many times as needed, replacing priv_anid with all the ANID values you’d like to convert to ANID2.
You may also convert the tool to do bulk conversions of ANIDs from any data source you want.
To test your Windows Phone 8 apps using ANID2, add your Publisher GUID in the app manifest using the following steps.
The Windows Phone 8 app on your Windows Phone 8 device should now return the same value for ANID2 during development that you would get after the app is published.
Something in the documentation on msdn.microsoft.com/.../microsoft.phone.info.deviceextendedproperties(v=vs.105).aspx was updated 6 days before this post. Would it be inappropriate asking why this tiny detail with DeviceUniqueID still does not appear there, even now, more than a week later than posting?
It still says "A unique hash for the device. This value will be constant across all applications".
You may consider moderating the spammer too.
Thanks for giving me the useful information. I think I need it. Thank you