aspnet / Security

[Archived] Middleware for security and authorization of web apps. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
1.27k stars 600 forks source link

SSO for Microsoft Outlook using auth0 #1925

Closed kandarp1993 closed 5 years ago

kandarp1993 commented 5 years ago

I am using auth0 to perform SSO for Microsoft Outlook. When I click on button it gives error like https://login.live.com/err.srf?lc=1033#error=invalid_request&error_description=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.&state=g6Fo2SBhSmMtbWFoY0FpT3ZGcjVrcFZzX3hHNkxvNTVKNlJ4baN0aWTZMmdhRm8yU0JtZDJkdVZIWk1kV1kzZERoTWFtRkNVbXg2WDJWdFFqTjRUV2xETXpseFNno2NpZNkgZW9GMENjNFlyMEp5bm9UYXB6aEVwUUJsaVVXeUVDTkc.

I have setup callback url https://localhost:3000/signin-microsoft. Please help to solve this problem.

Tratcher commented 5 years ago

We're going to need more information like:

kandarp1993 commented 5 years ago

@Tratcher So what I have done is client side SSO. I have used auth0. We have to create an app in Auth0. There we have to select type of application. In my case it is Single page application. Once you create app over there they will provide you sample code. Download that code and they will tell you to perform some command to install and run that sample code. So when you run npm start command, sample code will start running and open app on localhost:3000. Once you get here, you will see login button. When you click on that button, it will redirect you to Auth0 screen where you will see option to login with microsoft account. Now click on that button and you will get this error.

Tratcher commented 5 years ago

If this is all about Auth0 then why are you reporting it here?

kandarp1993 commented 5 years ago

Oh sorry. I was looking for solution and found out that many people have posted same issue and I tried the solution but did not work out for me. So I thought this would be place where I can post. It is not about auth0. Gmail login is working perfectly, but when I try with microsoft it gives me error.

Tratcher commented 5 years ago

We can only help you here if you're using the Microsoft.AspNetCore.Authentication.MicrosoftAccount nuget package (.NET web applications).

kandarp1993 commented 5 years ago

Oh Ok. Sorry for that.