Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Update MicrosoftAccount to use graph API & converged authentication #691

Closed

Conversation

OsmanMElsayed
Copy link
Contributor

  • Time has come to update Microsoft.AspNetCore.Authentication.MicrosoftAccount package to target Microsoft graph API as Live Connect API & Identity API are depreciated. For this, we need to issue tokens from the app model v2.0 endpoints which will extend the reach of the package to all work/school accounts which is clearly a big added value.
  • App model v2.0 has been in public preview since Aug 2015. AFAIK the GA is very close & it is expected to be in Feb & there are no expected breaking changes
  • Unfortunately, existing Microsoft account apps are not compatible with app model v2.0 & a new app registration is required. That's why this update is considered a breaking change. Check Restrictions on App #Registrations
    #92

-Updated MicrosoftAccountDefaults to use app model v2 & graph API
-Updated MicrosoftAccountHelper to extract user info from the user object
returned by the graph API
-Updated MicrosoftAccountMiddlewareTests accordingly
-Added the app model v2 client credentials to SocialSample/config.json
-Configured SocialSample to use SSL
@dnfclas
Copy link

dnfclas commented Feb 8, 2016

Hi @OsmanMElsayed, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.

TTYL, DNFBOT;

@Tratcher
Copy link
Member

Very promising.

@blowdart Are you aware of this transition for MSA?

@blowdart
Copy link
Member

Yup. We ought to run this past @brentschmaltz et al.

@muratg muratg added this to the 1.0.0-rc2 milestone Feb 11, 2016
using Newtonsoft.Json.Linq;
using System.Security.Cryptography.X509Certificates;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These need sorting, with System on top.

Osman M Elsayed added 2 commits February 12, 2016 12:01
- Sorted namespaces
- Dropped openid scope from Microsoft-AccessToken
project.json
- Sorted dependencies
MicrosoftAccountHelper.cs
- Removed name claim transofmation
- renamed GetName, GetFirstName & GetLastName
@Tratcher
Copy link
Member

@OsmanMElsayed did you test this with an outlook.com account? I can't get it working, it keeps complaining about redirect uri mismatches no matter how I configure it.

@OsmanMElsayed
Copy link
Contributor Author

Does that happen with outlook accounts only or it applies to all Microsoft accounts? If it applies to all Microsoft accounts, then please make sure that the registered redirect uri for your app contains the configured CallbackPath.
This is actually very confusing because the app model v2 authorize endpoint will not complain about the redirect uri & everything will look fine. But if u try to login with a Microsoft account you will get the redirect uri mismatch error.

@OsmanMElsayed
Copy link
Contributor Author

Hooray!
app model v2 is GA

@Tratcher
Copy link
Member

Tratcher commented Mar 4, 2016

Rebased and merged. The problem I ran into was because my old local usersecrets were overwriting the config.json so I was using the wrong client id.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants