How do I add an admin user with Opti 12?

  • Page Owner: Not Set
  • Last Reviewed: 2021-11-04

I'd like to add an admin user to my very fresh Opti 12 site


Answer

Alternatively and preferably for CMS 12

Use services.AddAdminUserRegistration

In your startup add

services.AddAdminUserRegistration

Then you can access /Util/Register and create an admin account


Additional Posts

Install the dotnet-episerver tool

dotnet tool install EPiServer.Net.Cli --global --add-source https://nuget.optimizely.com/feed/packages.svc/

Run the command

dotnet-episerver add-admin-user ProjectName.csproj -u Username -p Password -e Email -c EPiServerDB

Note: The Connection string variable name is VERY case sensitive.