Reputation: 16563
I'm trying to do Oauth2 login with Azure AD. I've tried these two URLs
and these lead to a login page. After I enter my email and password, I am redirected to https://login.microsoftonline.com/common/federation/oauth2
with these errors
Sorry, but we’re having trouble signing you in. We received a bad request.
Additional technical information: Correlation ID: 886be244-da75-419d-97b4-0e309473ce9e Timestamp: 2017-11-19 17:47:26Z
AADSTS50020: We are unable to issue tokens from this api version for a Microsoft account. Please contact the application vendor as they need to use version 2.0 of the protocol to support this.
I checked my server logs, and the Azure servers haven't even tried to contact me after the login page.
Any ideas how I figure out what the problem is?
Upvotes: 1
Views: 2210
Reputation: 16563
Microsoft's documentation is insanely frustrating, but I think I've figured out the issue.
I believe that if you are registering a new app to use any Oauth2 services, you can only register an app to use the v2.0 protocol. I searched extensively, and I was not able to figure out how to register an app to use the older v1.0 protocol.
Despite this, much of the documentation still relates to the v1.0 protocol, some of the documentation states that the v1.0 protocol is recommended in certain situations even though you can no longer register an app for it.
Anyway, here is a summary:
If you register a new app (at https://apps.dev.microsoft.com/#/appList) then ignore all documentation relating to the v1.0 protocol because you apparently can't use it.
Upvotes: 1