Graham Carr
May 9, 2024
  917
(3 votes)

A day in the life of an Optimizely Developer - Enabling Opti ID within your application

Hello and welcome to another instalment of A Day In The Life Of An Optimizely developer, in this blog post I will provide details on Optimizely's Opti ID, what it is and how it can easily be enabled within your website.

What is Opti ID

Opti ID offers a centralised login experience, allowing seamless switching between Optimizely products with just one authentication using Okta, Entra ID, or a local login. It also enables centralised user management using the Opti ID Admin Centre.

Opti ID provides the following benefits:

  • Centralized Login with SSO: Enjoy single sign-on (SSO) with support for multi-factor authentication (MFA) using your preferred MFA setup and active directory authentication provider.
  • Application Switching: Switch between applications without needing to re-authenticate.
  • User Administration: Easily manage Opti ID users, groups, and roles from a centralized location.
  • Account and User Dashboard: Access comprehensive usage and billing information through a centralized dashboard.

Businesses investing in marketing technology often face challenges in balancing flexibility and composability within their tech stacks while managing multiple solutions from different providers. Analysts highlight the financial and administrative burdens associated with maintaining diverse best-of-breed point solutions.

Optimizely addresses these challenges by simplifying the adoption and management of digital experience solutions. Whether you choose a single Optimizely product or the entire suite, you gain access to a cohesive solution that can be conveniently accessed and utilized from a unified platform.

How to enable Opti ID

There are a couple of ways of enabling Opti ID within your website, either by SAML or OIDC. I decided to go down the OIDC route so this is what will be covered, however the references section further down provides some links to useful articles on enabling Opti ID.

Install Nuget Package

The first step is to ensure that the following Nuget package is installed in your web project:

Update Startup.cs

You now need to add the following line of code to your Startup.cs class in the ConfigureServices method:

services.AddOptimizelyIdentity(useAsDefault: true);

You need to ensure at this point that if you are not using ASP.Net Identity then you need to remove any code references to:

services.AddCmsAspNetIdentity<TUser>()

Running Opti ID locally

To ensure that you can run Opti ID locally you need to first of all add the following to your appsettings.json file within the Episerver / CMS section (it is worth noting that these values get added automatically when you deploy your website to DXP):

      "OptimizelyIdentity": {
        "InstanceId": "xxx",
        "ClientId": "xxx",
        "ClientSecret": "xxx"
      },

To get the values for InstanceId, ClientId and ClientSecret, you need to head over to PaaSPortal (https://paasportal.episerver.net) and go into the API tab of the correct organisation. You will see a section detailing Opti ID dev key, these are the values that you need to put into your appsettings.json.

Then that is all that is required from a coding perspective, the next step goes beyond the detail of this article however the references section provides links to detail on how you configure Entra or Okta to allow authentication, authorisation and synchronisation of users and groups.

In conclusion, Opti ID is a great solution for organisations who have multiple Optimizely products that they want to be able to access via an integrated SSO solution.

References

https://support.optimizely.com/hc/en-us/articles/18127857412493-Install-Opti-ID-for-CMS 
https://support.optimizely.com/hc/en-us/articles/18129917620109-Configure-SSO-with-Opti-ID-using-SAML 
https://support.optimizely.com/hc/en-us/articles/18129890210573-Configure-SSO-with-Opti-ID-using-OIDC
https://support.optimizely.com/hc/en-us/articles/17917477783181-Sync-groups-from-your-SSO-provider 

Graham Carr, Lead .NET Developer

I am an experienced Lead .Net Developer with over 25 years’ experience in a wide range of products and technologies. I have helped companies deliver their digital vision from concept all the way through to delivery. I have a particular passion for DXPs (Digital Experience Platforms) and am a certified developer for products such as Optimizely, Umbraco, Kontent.ai and more.

May 09, 2024

Comments

Please login to comment.
Latest blogs
Increase timeout for long running SQL queries using SQL addon

Learn how to increase the timeout for long running SQL queries using the SQL addon.

Tomas Hensrud Gulla | Dec 20, 2024 | Syndicated blog

Overriding the help text for the Name property in Optimizely CMS

I recently received a question about how to override the Help text for the built-in Name property in Optimizely CMS, so I decided to document my...

Tomas Hensrud Gulla | Dec 20, 2024 | Syndicated blog

Resize Images on the Fly with Optimizely DXP's New CDN Feature

With the latest release, you can now resize images on demand using the Content Delivery Network (CDN). This means no more storing multiple versions...

Satata Satez | Dec 19, 2024

Simplify Optimizely CMS Configuration with JSON Schema

Optimizely CMS is a powerful and versatile platform for content management, offering extensive configuration options that allow developers to...

Hieu Nguyen | Dec 19, 2024

Useful Optimizely CMS Web Components

A list of useful Optimizely CMS components that can be used in add-ons.

Bartosz Sekula | Dec 18, 2024 | Syndicated blog

SaaS CMS - Pages and Blocks get the Visual Builder Treatment

I’m thrilled to see that Optimizely has now enabled Visual Builder for OG Pages and Blocks within SaaS CMS, and I’m guessing this will become...

Minesh Shah (Netcel) | Dec 17, 2024