authenticationmanager.getexternallogininfo() returns null always with linkedin

Finally, I got the solutions after long time.

Add this line in Startup.cs file of ConfigureAuth(IAppBuilder app) function. Same as per below code.

public void ConfigureAuth(IAppBuilder app)
      //Add this line at first inside the function.

      System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

      //Other code 



  1. Kamdyn

    • 2019/6/15

    getexternallogininfo() returns null always with linkedin · c# oauth-2.0 linkedin. I have used Oauth2 in my MVC project. We can 

  2. Carter

    • 2019/2/26

    We can connect successfully with our app with credentials but after authenticating user return always null in external login call back method. Checked many solutions but no luck but another login is working fine like Facebook. For this integration, I have used Microsoft.Owin 4.0.0 version in the application.

  3. Kaysen

    • 2020/8/24

    authenticationmanager.getexternallogininfo() возвращает null всегда с linkedin. Я использовал Oauth2 в своем проекте MVC.

  4. Adrian

    • 2021/1/13

    I find that AuthenticationManager.GetExternalLoginInfo works fine in the ExternalLoginCallback action. However, if I have it anywhere else, it always returns null, even if the user is logged in. However, if I have it anywhere else, it always returns null, even if the user is logged in.

  5. Bruno

    • 2018/12/1

    What the MVC controller does when it receives the external identity (through a call to AuthenticationManager.GetExternalLoginInfoAsync() ) is to 

  6. Samson

    • 2015/2/20

    In the following code, GetExternalLoginInfoAsync allways returns null. returnUrl) { var loginInfo = await AuthenticationManager. All works fine in the development environment but on real the call after external authentication AuthenticationManager.GetExternalLoginInfoAsync() sometimes returns null.

  7. Jensen

    • 2020/8/1

    I know that the line that is failing is this: AuthenticationManager.GetExternalLoginInfoAsync(); -- it's coming back null. No sweat if you have 

  8. Gage

    • 2019/1/5

    Francesco, this is waht i am struggling.. I tried creating fresh applicatin from scratch with just google enabled. it just returns to login again. On debugging i found out said method retuns null. Also, what i see from the url, google is returning the username, email, firstname in the url, Dont know why OWIN is not recognizing it. and gives null.

  9. Callen

    • 2017/9/11

    This tutorial shows you how to build an ASP.NET MVC 5 web application that enables users to log in using OAuth 2.0 with credentials from an 

  10. Kendrick

    • 2018/8/29

    I'm using Twitter authentication along with cookie authentication and i'm getting null when the application returns to my ExternalLoginCallback action and asks the SignInManager for the login info. I've registered a callback in the twitter middleware for when the ticket is being created and I've confirmed that I've received an access token from

  11. Ivan

    • 2020/2/17

    NET Core Identity Framework) and some via AAD. Calling signInManager.GetExternalLoginInfoAsync() leads to null return value with the updated 

  12. Kim

    • 2016/1/27

    When getting the callback to /Account/ExternalLoginCallback the call to SignInManager.GetExternalLoginInfoAsync returns info just fine. The user then registers and the callback to /Account/ExternalLoginConfirmation is called and SignInManagerGetExternalLoginInfoAsync now returns null. The data isn't staying around for some reason.

  13. Adrien

    • 2016/5/28

    GetExternalLoginInfoAsync(); if (loginInfo == null) { return RedirectToAction("Login"); } var loginInfo = await AuthenticationManager.

  14. Cook

    • 2015/2/20

    GetExternalLoginInfo return null #89. sadeghhp opened this issue on Mar 2, 2015 · 2 comments. Labels. invalid question. Comments. leastprivilege added invalid question labels on Mar 3, 2015. leastprivilege closed this on Mar 3, 2015.

  15. Jeffery

    • 2015/12/27

    Failure is an Option. As they say, security is hard and I thought I understood the OAuth 2.0 flows pretty well. However, my first attempt failed 

  16. Felipe

    • 2017/12/12

    if (manager == null ). {. throw new ArgumentNullException( "manager" );. } return GetExternalLoginInfo( await manager.AuthenticateAsync(authenticationType));.

Comments are closed.

Recent Posts