Reputation: 4571
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.
Upvotes: 3
Views: 2455
Reputation: 49
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" />
Upvotes: 0
Reputation: 39007
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.
Upvotes: 3