Developer forum

Forum » Integration » Extranet autologin with Windows authentication

Extranet autologin with Windows authentication

Roald Haahr Jensen
Reply

Hi,

On a project running on 9.6.11, we have made an integration to AD following your guide. Now, we would like to be able to make an extranet autologin using Windows authentication, so that the user, who is logged into a computer with their AD credentials, will be logged automatically into a section for users that are logged in. Is that possible?

Best regards,
Roald, Novicell


Replies

 
Nicolai Pedersen
Reply

It is not as easy as in the old days of IE and Windows authentication in the browser. This integration is kind of a replacement of the previous implementation we had that authenticated directly on the AD using windows or basic authentication.

You should be able to enable Windows authentication which will login the user on your website with windows credentials - but it requires that the IIS is connected to the AD which is very unocmmon these days. Read more here: https://docs.microsoft.com/en-us/iis/configuration/system.webserver/security/authentication/windowsauthentication/

If you get that to work, you can probably do some magic in code to login the user.

Consider this kind of login as "deprecated" - today you would use a pure browser based login like Facebook login, linkedin or in this case Azure AD login (like logging in to Office 365 etc.). And use it with external authentication in Dynamicweb. This way the login service (Azure AD) will log your users in and take care of keeping them alive.

BR Nicolai

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Roald,

 As it is described here and here you can use the following code to get the current AD logged in user name:

var name = System.Web.HttpContext.Current.User.Identity.Name;

Best regards, Dmitrij

 

You must be logged in to post in the forum