asp.net-mvcoauthoauth-2.0windows-livemicrosoft-account

Signin with Micsrosoft Account without requesting consent to access the Contact information


I'm using ASP.Net MVC 5 and would like to allow my users to use Microsoft Accounts for signing.

The default setup to use Microsoft Account will ask permission from the end user to access the contact list in addition to the profile.

Is it possible to have a more limited access? My web application has nothing to do with contacts of the users and therefore I don't want to unnecessarily request this.


Solution

  • OK This is done by using the wl.emails scopes

        MicrosoftAccountAuthenticationOptions msao = new MicrosoftAccountAuthenticationOptions();
        msao.Scope.Clear();
        msao.Scope.Add("wl.emails");
        msao.ClientId = "...";
        msao.ClientSecret = "...";
        app.UseMicrosoftAccountAuthentication(msao);