Here is the scenario:
MVC 3 application runing in AZURE Dev enviroment Authentication in AZURE ACS implemented the same way found here http://msdn.microsoft.com/en-us/library/hh127794.aspx
I am trying to get the users name, and email, but I can't find a way to configure the "Claim Rule", in a way that I would get a clear text value, instead I get a string that seems to be encrypted. So can I configure the rule in a way that I get it in clear text? Or can I unencrypt the value returned? Is any of this possible or am I looking at the wrong thing here.
Thanks
IIRC, it is against Windows Live privacy policy to release the user's name or email address as claims (unlike Gmail or Yahoo!). As such, it is not possible to get those claims from Live (unless you happen to be Microsoft).
The only value you can get is called a name identifier. It is unique per RP domain (i.e. it is not a single value per LiveID, but differs by domain). This is also intentional so that you cannot have different websites collaborating to track a user. Typically, you would get the name identifier (called a PUID) and then stick that in your database somewhere so you know that you have seen it before. Then the user registers on your side with name, email, etc. and you correlate that with the PUID.
On the other hand, LiveId also supports OAuth2, so you can get whatever user profile information you need from the user (with his/her consent). See here.
This is a total #FAIL on the part of Microsoft. The users, when logging into your site using Google or other providers, they have to accept first. Then they simply pass the basic information to the site, the site uses it, and everyone is happy.
BTW you can get it from the user with behind-the-scenes code pages but it's not seamless for the user, requires a manual process, but nonetheless the LiveID system is not more secure for doing this, it's simply broken.
Possible but it requires a bit of code for a custom sts:
https://gist.github.com/1867792
Code doesn't build and dependencies aren't included... but it's largely based off an early thinktecture starter site ported to MVC4 with changes shown above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With