Take the 2-minute tour ×

I am trying to write a Windows Phone 8 app which needs to save some information about the user in the cloud, to be able to identify him/her in future. For the cloud database, I am using Azure Mobile Service. But, I am not sure what information to use as the unique userid. Either I can come up with something of my own, or I can use some existing identity services.

Knowing that Windows Live ID (now known as Microsoft Account) is so integrated with Windows Phone workflows, I thought I can use that but doesn't seem like there is an easy way of doing that?

Does anyone know how my app can make use of Windows Live ID information that the user is already using to login to the Phone?

I want to make the process as seamless as possible for the app-user which is why I want to avoid getting the user to sign-up for my custom identification mechanism.

share|improve this question
possible duplicate of I'm not able to get my ANID? –  JustinAngel Dec 24 '12 at 23:49

2 Answers 2

The anonymous ID might be what you're looking for:

string anid = UserExtendedProperties.GetValue("ANID") as string;
string anonymousUserId = anid.Substring(2, 32);

This ID is tied to the user's live account. It should therefore be usable to uniquely identify an user.

share|improve this answer
Looks like this is not supported for WP8. The first statement throws "not supported" exception –  Raman Sharma Dec 24 '12 at 18:32
@SometimesADeveloper Have you tried "ANID2"? social.msdn.microsoft.com/Forums/en-US/wpdevelop/thread/… –  KooKiz Dec 24 '12 at 20:39
yes, that doesn't work either –  Raman Sharma Dec 28 '12 at 1:32
Did you check WMAppManifest.xml for capabilites? –  Alex Sorokoletov Apr 17 '13 at 12:10

use instead for Win Phone 8 apps

string anid = UserExtendedProperties.GetValue("ANID2") as string;

Also make sure those are checked from the WMAppManifest

<Capability Name="ID_CAP_IDENTITY_DEVICE" />
<Capability Name="ID_CAP_IDENTITY_USER" />
share|improve this answer

Your Answer


