A public facing website can have services and content that it wants to make available only to users that are authenticated. In this case the user is requested to register on the website and provide some information before given access to the secure content.
When using Windows Live authentication, there are two ways that the registration can be accomplished.
1. Ask the user for a valid Windows Live ID
2. Create a new Windows Live ID for the user, which he will use to login to the website.
The later could be that you want to provide an email using your own custom domain for your website’s users. In both cases, the PUID of the user should be retrieved and saved along with the rest of the user’s information.
In both cases, the Windows Live Admin Center SDK can be used to either create a new Windows Live account and/or retrieve the user’s PUID.
The Windows Live Admin Center SDK can be downloaded from here.
After you retrieve the PUID of the user from Windows Live, you can save it in a custom database along with the rest of information that the user has supplied during the registration process.
In part 4 of this series, we saw how we can use claims augmentation to add claims to the claims returned from Windows Live. During this process you have a chance to validate the PUID of the logged in user with the database of registered users you have, and then either allowing or denying access accordingly. As mentioned before, this can be achieved by defining a user policy on the web application.