Last post Apr 23, 2015 09:41 PM by Krunal Parekh
Apr 16, 2015 12:17 PM|jake.watkins|LINK
I'm throwing together a simple POC for a client that wants to use LiveId (now Microsoft Account or MSA) for users to sign in. I've done this with FaceBook, Google and Twitter and they were all a walk in the park. For whatever reason MSA is a royal PITA.
I've created a MVC5 application using Visual Studio 2015. I went to the MSA developer center to create my app and get the client id and secret. The redirect URL I'm using is
http://localtest.me/membersweb/signin-microsoft The client id and secret go in Start.Auth.cs just like usual.
I've setup IIS and have my app in a virtual directory. When I run my application it comes up like usual. I click Log In and it goes to the login page as expected and the Microsoft button appears in the right hand column as expected. When you click the
Microsoft button you are redirected to the MSA sign in page. B/c I'm already signed in I should be taken to the authorization page where I give my application permission to access my info. Instead I'm taken to an error page. The title says "We're unable
to complete your request" and the rest of the message says "Microsoft account is experiencing technical problems. Please try again later.". Pretty useless. The url is a tiny bit more helpful with the following error message:
This isn't rocket science. I do this w/ FaceBook all the time. What the blazes am I doing wrong?
No other coding, configuring or customization has been performed.
Apr 17, 2015 04:38 AM|Krunal Parekh|LINK
I believe this issue is related to redirect url that you have setup in Api Settings in the Microsoft Account Developer Center.
1. Open your Microsoft Account Developer Center >API Settings.
You can follow below tutorial by Ben Day.
AS per this walkthrough the error you are getting is related to Redirect URL
"Click the API Settings link in the left column of the screen. You should now be on a screen that looks similar to the screenshot below. You need to populate the Redirect URLs textbox. When a user logs in to your app successfully, the Microsoft Account
service will redirect them back into your application. The Redirect URL value is URL in your app where they’ll be sent. In this sample, we’re going to say that our domain name is
www.mysampleapp.com. Don’t worry. You don’t have to actually register this domain. I’ll walk you through how to make this work all entirely on your development machine later in this post. Set the Redirect URLs text
box to http://www.mysampleapp.com/Account/ExternalLoginCallback and click the Save button.
UPDATE (June 13, 2014) — With the latest version of the code, the Redirect URLs value has changed. If you’re getting an error when you run the app that says invalid redirect_uri, then you should change this value to
Apr 21, 2015 11:35 AM|jake.watkins|LINK
The POC I developed is based on Ben's excellent article. The URL I provided matches the June 14th update in his article and I still get the redirect_uri error. Is there something else I'm missing?
Apr 23, 2015 09:41 PM|Krunal Parekh|LINK
The URL I provided matches the June 14th update in his article and I still get the redirect_uri error. Is there something else I'm missing?
It seems I didn't check if the link is working.
http://www.mysampleapp.com/signin-microsoft if you are using this it seems like its not working now. perhaps you should deploy your sample app and provided a link that works. Hopefully that should resolve the issue.