locked
Angular 4 SPA with Windows Authentication RRS feed

  • Question

  • User1195138146 posted

    I am building an intranet application using Visual Studio 2017 and used the template for creating a .NET Core Web Application with Angular. Since it is an intranet application, we want to implement windows authentication. The users are already logged in to the network and we wouldnt want them to enter their credentials again when they access the application.

    How can I setup my Angular application so that it can recognise the user that is already logged in to the network and pass it appropriately. We have a Web API Authentication API that can take this user id and determine which AD Groups the user exists in, in order to determine authorisation to the application.

    Friday, February 2, 2018 9:26 PM

Answers

  • User-474980206 posted
    You just need to host with IIS and enable windows authentication in IIS and asp.net core. The user name will passed to the core app. See



    https://docs.microsoft.com/en-us/aspnet/core/security/authentication/windowsauth?tabs=aspnetcore2x
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 3, 2018 4:23 PM

All replies

  • User-474980206 posted
    You just need to host with IIS and enable windows authentication in IIS and asp.net core. The user name will passed to the core app. See



    https://docs.microsoft.com/en-us/aspnet/core/security/authentication/windowsauth?tabs=aspnetcore2x
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 3, 2018 4:23 PM
  • User1195138146 posted

    Thank you Bruce. Actually I had done that already but it was not passing the logged in user id. I just found out that I also had anonymous authentication turned on. As soon as I turned that off, I was able to see the user id.

    Thank you for the answer though.

    Saturday, February 3, 2018 9:45 PM