Using an Microsoft OAuth for authenticating with Azure Mobile Services

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:

https://myservicename.azure-mobile.net/

However, that apparently isn’t good enough. You have to also put a specific redirect, in addition to this, which would be:

https://myservicename.azure-mobile.net/login/microsoftaccount

So that it looks something like this:

image

Posted in Azure, Computers and Internet, General, Mobile, Security, Uncategorized
One comment on “Using an Microsoft OAuth for authenticating with Azure Mobile Services
  1. code_monkee says:

    This fixed my issue. Thanks Rob.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives
Categories

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 5 other followers

%d bloggers like this: