In order to use Umbraco for our intranet, our IT Director has specified that it use our on-prem Active Directory for member login (and likely user login for the back-office as well, but one thing at a time). In order to accomplish this, I am using the UmbracoIdentity NuGet package from the awesome Shannon Deminick.
Test Site Details:
- Local Dev Server: Windows Server 2019 Datacenter
- .NET Framework version: 4.7.2
- Umbraco version: 8.9.0 (plan on using latest once I am able to get things working)
- UmbracoIdentity version: 7.1.1 (I see that there has been a 7.2 release, which I will try, but I’m assuming that the setup for AD will be the same)
Work and Research So Far:
- With the package installed, have gone through the setup procedure found at https://github.com/Shazwazza/UmbracoIdentity/wiki. This lets me login with “normal” Umbraco credentials at http://DevServerAddress/account/, but doesn’t touch our Active Directory.
I’ve read through:
- https://shazwazza.com/post/aspnet-identity-for-umbraco/
- https://github.com/Shazwazza/UmbracoIdentity
- https://github.com/Shazwazza/UmbracoIdentity/wiki (all 8 pages)
- https://github.com/Shazwazza/UmbracoIdentity/tree/master/src/UmbracoIdentity (some of the files – I couldn’t tell you which ones at this point)
- https://our.umbraco.com/forum/extending-umbraco-and-using-the-api/91508-umbraco-identity-there-are-no-external-authentication-services-configured-error-message (doesn’t seem to apply)
- https://our.umbraco.com/forum/extending-umbraco-and-using-the-api/77047-umbracoidentity-and-custom-members (especially Shannon Deminick’s input at https://our.umbraco.com/forum/extending-umbraco-and-using-the-api/77047-umbracoidentity-and-custom-members#comment-308474)
- …and much more
From what I’ve been able to glean from documentation and research, I need to make the following changes/additions:
SITE_FOLDER\App_Start\UmbracoIdentityOwinStartup.cs => ConfigureUmbracoUserManager(IAppBuilder app) => app.ConfigureUserManagerForUmbracoMembers<UmbracoApplicationMember>(*[ADD SOMETHING HERE? IF SO, WHAT?]*);SITE_FOLDER\Web.config => <membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15"> => <providers> (after <clear />) => <add name="UmbracoMembershipProvider" type="UmbracoIdentity.IdentityEnabledMembersMembershipProvider, (*CHANGE THIS, OR THE WHOLE TYPE STRING?*)" minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="10" useLegacyEncoding="false" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Member" passwordFormat="Hashed" allowManuallyChangingPassword="false" />SITE_FOLDER\config\umbracoSettings.config => <security> => *???*SITE_FOLDER\Models\UmbracoIdentity\UmbracoApplicationMember.cs => UmbracoApplicationMember => GenerateUserIdentityAsync(UserManager<UmbracoApplicationMember, int> manager) => // Add custom user claims here (*I DON’T THINK I NEED ANY AT THIS TIME???*)
I appreciate that to use this library, one is supposed to have a firm grasp of Umbraco, ASP.Net Identity, OWIN, etc..
For better or worse, using Umbraco for the Intranet and authenticating members with local AD is what is being asked for, and I’m pretty much new to all of these, so please bear with me – thank you.