I’m doing a new project with Azure Mobile Services (which are wildly impressive by the way). I could easily get Google, Twitter, and Facebook logins to work – but the Microsoft one was tricky. I kept getting this error:
The provided value for the input parameter ‘redirect_uri’ is not valid. The expected value is ‘https://login.live.com/oauth20_desktop.srf’ or a URL which matches the redirect URI registered for this client application.
This took more than a couple hours of research, because I’m apparently the only person on the Internet who has gotten this error! Here is what is going on:
When you set up your app on the Microsoft site (https://account.live.com/developers/applications/) you must specify a redirect URL for after it finishes authenticating your user. For every other service, that URL was simply your Azure Mobile Service endpoint, so something like:
However, that apparently isn’t good enough. You have to also put a specific redirect, in addition to this, which would be:
So that it looks something like this: