Customising the experience for Sitecore AD users

In the overwhelming majority of Sitecore installations that we deliver for clients, content authors want to use the Active Directory integration module to login to Sitecore -- understandable, who wants to have another login!  As outlined in my previous post about recursive AD synchronisation, it is actually quite simple to set up the Sitecore AD module to use your AD roles and user accounts to enable Sitecore login.

One of Sitecore's little idiosyncrasies is that by default it will log you in to the content editor application, which I find is the least useful thing for most content authors.  Generally we want to log content authors into the Sitecore Desktop.  This is not a setting that you can set on a role, instead it is a setting of the user's profile.


You can definitely go an individually update each of the users that have been created by the  AD module to by default log the user into the desktop, but we don't want to have to do that every time we create a new user.  Sitecore does support a better way...

Default domain profiles

In order to have all AD users created with a particular start URL (or any profile settings such as a particular wallpaper) we have to create a new default user profile.
The first step for this is to create a profile template with fields the we required.  To do this we need to switch to the core database and create a new template at the location /sitecore/templates/System/Security inheriting from the existing "User" template at that location.  In this example I've called the template "ADUser"


Then add a new field "StartUrl" (single-line text) to the new ADUser template


Finally create an instance of this new ADUser template under /sitecore/system/Settings/Security/Profiles, name the item "AD Desktop User", and set following values for the profile: 
  • StartUrl = /sitecore/shell/default.aspx


Finally update the domains.config file in /App_Config/Security to use the new profile for the "ad" domain (or whatever you have named the domain that AD users have been synchronised into:
  • <domain name="ad" ensureAnonymousUser="false" defaultProfileItemID="{[GUID of AD Desktop User item]}"/>

When you log AD users log in using the LDAPLogin.aspx, they should now be logged into the Sitecore desktop.  You can also use this approach to set any other default profile values (e.g. wallpaper) that you want for users based on their domain.


Comments

Popular posts from this blog

Cloud hosting Sitecore - High Availability

Sitecore - multi-site or multi-instance?

Setting up TDS to work with Azure DevOps