I have an app that performs a calculation, and I need to store this results in a database via webservice. I need to store this results with some user identification, in a table structure like this:
user_id| test_result
The problem I have is that I don’t know how to obtain the “user_id”. Is there an API that simply retrieves the store username/e-mail? If there’s not, What’s the simplest approach?
Thank you in advance.
There is a class in WinRT that will give you the users name (domain name and display name):
Take a look at
Windows.System.UserProfile.UserInformation
Or you could use a third party authentication, like a Facebook login. There’s an app sample for that at http://code.msdn.microsoft.com/windowsapps/Web-Authentication-d0485122