Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • MrFlo 159 posts 403 karma points
    Aug 02, 2017 @ 10:54
    MrFlo
    0

    Authenticating Umbraco users with Active Directory automatically or without entering credentials ?

    Hi,

    I am working on a backoffice authentication with Active Directory and it's really easy with the built-in IBackOfficeUserPasswordChecker for Active Directory in Umbraco 7.5.0+
    It's working well and I have to create the user first with the same login as the active directory one which is fine for now. But I would really like to skip the back-end login form if the Active Directory User is authenticated on Windows. So the user would be logged automatically. I'm doing this on the front-end for members but I would like to do the same for backoffice users.

    Any idea how I could do that ?

    Thanks!

    MrFLo

  • 3ijtKwijt 36 posts 216 karma points
    Aug 16, 2017 @ 09:23
    3ijtKwijt
    0

    Mind explaining me how you got the front-end users to automatically login?

    Thanks in advance!

  • MrFlo 159 posts 403 karma points
    Aug 16, 2017 @ 13:20
    MrFlo
    0

    Hi,

    Sure, I've created a BaseController (using the hybrid framework example) where I am checking if the user is authenticated. It's an intranet so all users have to be connected to Active directory to see the website. Then you can query user information on Active Directory using the user Identity (Don't forget to activate windows authentication on IIS) You can get the user login by using User.Identity

    That's mainly it. I could share the code if you want.

    I didn't find a way to do an auto-login on umbraco but I'm sure there is a way to do it.

    Hope it helps

  • Moran 285 posts 934 karma points
    Oct 24, 2019 @ 14:20
    Moran
    0

    Hi Can you share your code? I am looking for a solution for auto login too. Thanks.

    BTW, do I need to do something more on my iis than turning on the windows authentication in the add features section in the control panel?

  • 3ijtKwijt 36 posts 216 karma points
    Aug 16, 2017 @ 13:23
    3ijtKwijt
    0

    Alright thanks!

    It's also for an intranet, and got it working with login through Active Directory already, I'm just struggling to make the users logged in automatically :c

  • MrFlo 159 posts 403 karma points
    Aug 16, 2017 @ 13:25
    MrFlo
    0

    Just try to get it even in razor with @User.Identity.Name if you have activated windows authentication on IIS you should see the user logged

  • 3ijtKwijt 36 posts 216 karma points
    Aug 16, 2017 @ 13:30
    3ijtKwijt
    0

    Yeah, I already got that far, so I just had to fix that certain pages were only accessably for certain groups of users within AD

    Edit got the front end and back end now working with Active Directory, yet I'm searching for the same thing right now!

Please Sign in or register to post replies

Write your reply to:

Draft