Sam
Nov 30, 2026
visibility 60
star star star star star
(0 votes)

Opti ID in the field: diagnosing sign-in and access problems on CMS 12

We moved a multi-site Optimizely CMS 12 estate on DXP to Opti ID in June 2026, synchonised to the customer's Microsoft Entra ID. Over the next three months we hit four separate sign-in and access problems, he is how we solved.

How a federated Opti ID sign-in flows

A sign-in crosses three parties: your CMS, Opti ID at login.optimizely.com, and the customer's identity provider. Opti ID's sign-in pages run on Okta, so you will see /idp/idx/ endpoints and x-okta-request-id response headers in a capture.

For the last hop: Opti ID sends the browser back to your site with a form POST /signin-oid. That request carries either an authorisation code or an error with an error_description. The CMS then redeems the code on the server and asks Opti ID which roles the user has on this CMS instance.

Federated Opti ID sign-in · 8 steps, 4 failure points

Every step except the dashed code redemption passes through the browser as a redirect or form post, which is why a HAR shows almost all of it.

Capturing a HAR you can actually use

•       Start recording before the first click, with Preserve log on. The username is only sent in POST /idp/idx/identify. A capture that starts on the Opti ID page misses it, and misses the URL the user was trying to open.

•       Redact before you share. A HAR of the Opti ID password step holds the typed password in clear text, in the body of POST /idp/idx/challenge/answer. Remove it, and ask the user to change their password if a raw capture has already been sent anywhere.

•       Check x-okta-request-id on the responses. If it's there, the request reached Opti ID, which rules out a corporate proxy or web filter blocking it.

•       Keep the correlation ids. The Okta request ids and Entra's client-request-id let Optimizely support and the customer's Entra admins find the exact event in their own logs.

•       Don't expect to see tokens. Opti ID redeems the identity provider's code on its own server, so the Entra ID token never appears in the browser.

•       For transport problems, use chrome://net-export. DevTools can misreport HTTP/3 requests; the net-export log records what actually went over the wire.

Problem 1: "Unable to sign in" for one user

The user had never been provisioned into Opti ID. Opti ID's user enumeration protection hides that, so the screen looks like a password failure.

Symptom. A user types their work email on the Opti ID page. Instead of being sent to Entra, they get "Verify with your password", then "Unable to sign in". Colleagues on the same domain sign in fine.

What we ruled out. The customer's web filter was in the path, and our first theory was that it blocked Optimizely. But the failing response carried an x-okta-request-id, so it had reached Opti ID. Federation wasn't broken either, because other users were routed to Entra normally.

Evidence. The POST /idp/idx/challenge/answer response told the story:

•       HTTP 401 with errors.E0000004, "Authentication failed". That is the generic code, used on purpose for every kind of failure.

•       No redirect-idp option anywhere in the body, so Opti ID never offered to send this user to Entra.

•       One okta_password authenticator with "allowedFor": "none". In our captures that was the giveaway: a placeholder offered for an account Opti ID doesn't hold.

Wrong password, locked account and missing account are deliberately identical at this endpoint. Don't try to triage from the error text; get the username and check provisioning.

Fix. Find the user in Entra admin centre → Enterprise applications → your Opti ID provisioning app → Provisioning logs. Typical reasons for a skip are not being in an assigned group, falling outside a scoping filter, or a missing mail attribute. Once you find one, check the whole group: in our case several users from the same domain had fallen out together. If you need to check the setup itself, Talha's guide explains how the SSO connection and the separate SCIM provisioning app fit together.

Two related points:

•       Provisioned isn't the same as routed. Provisioning creates the Opti ID account; routing to Entra is configured in Opti ID itself. Talha's guide describes it as registering your email domains against the SSO connection. We didn't need IdentityProviderId in the app's options: Opti ID sent users to Entra without it.

•       Provisioned isn't the same as authorised. As Talha points out, SCIM brings over users and group memberships but doesn't assign product instances or roles. You map groups to instances and roles in the Admin Centre. The sign-in also requests the idx_instancepermissions scope, so the user needs a role on that specific CMS instance. Missing that role produces an access problem, not "Unable to sign in".

Problem 2: Access Denied after a login that "worked"

Opti ID couldn't match the Entra user to their existing Opti ID account, because it matched on an email address spelled differently from the user's sign-in name. It then tried to create a new account, which was switched off.

Symptom. A user opened a protected document on the public site, went through sign-in without seeing a prompt, and landed on the CMS Access Denied page (/util/errors/error403?ReturnUrl=...). They reported that "login is fine", and from where they sat it was: Entra signed them in silently in a quarter of a second.

The trap. That page looks like a CMS access rights problem, and the natural move is to change the permissions on the file or its folder. Don't. No identity was ever established, so no access right could have helped.

Evidence. The answer was in the body of POST /signin-oid:

error=access_denied
error_description=User creation was disabled.

There was no code parameter, which means authentication never completed. Before it, Entra had returned a valid code to Opti ID's callback, followed by a redirect through /login/error/redirect.

Cause. The user did exist in Opti ID, provisioned with their Entra user principal name (UPN). But Opti ID matched the incoming user on their email address, and their primary email was spelled one letter differently from their UPN. With no account under that email, Opti ID fell through to just-in-time account creation, which was disabled.

There was a neat confirmation. Typing the email spelling on the Opti ID page produced Problem 2's "Unable to sign in", because that account doesn't exist. Two spellings, two different error screens, one cause.

Fix. Pick whichever your organisation owns:

1.      Ask Optimizely to match federated users on the UPN, or on both UPN and email.

2.      Change the user's Opti ID login to their primary email. Check that provisioning doesn't overwrite it back.

3.      Align the user's Entra mail attribute with their UPN. This changes their mailbox address, so it's the most disruptive.

Any user whose UPN differs from their primary email will hit the same wall, so look for them before they find you:

Get-MgUser -All -Property userPrincipalName,mail |
  Where-Object { $_.mail -and $_.mail -ne $_.userPrincipalName } |
  Select-Object userPrincipalName, mail

Problem 3: no groups to choose in Set Access Rights

With Opti ID as the only sign-in, nothing could list the CMS's local groups any more, so the access rights picker came up empty. Registering a virtual role is the way to make a role name assignable again.

Symptom. Groups created under Admin → Administer Groups (for example "Form admins") couldn't be found on the Set Access Rights screen on any deployed environment. Rules that already used those groups kept working, which made it easy to miss for weeks.

Cause. We registered AddCmsAspNetIdentity only in Development, so developers keep local accounts and every other environment signs in with Opti ID. Graham Carr's walkthrough goes further and removes it altogether when you aren't using ASP.NET Identity. Either way, deployed environments end up with no local role store. Access rules keep working, because the CMS stores each role in a rule as a plain string. But the picker searches two sources:

•       Roles from a role store. Outside Development there isn't one. Opti ID adds a role claim to each user at sign-in, but in EPiServer.OptimizelyIdentity 1.1.0 there's no group directory to search.

•       Virtual roles. Everything registered with AddVirtualRole shows up.

Fix. Register a virtual role for each name you need to assign. If membership already comes from somewhere else, the role can be a pure label that never grants anything. Our example is the role the Content Delivery API uses to decide what content it may return:

/// Registered only so "Content Api Access" can be found on the Set Access Rights screen.
public class ContentApiAccessRole : VirtualRoleProviderBase
{
    // Never grants membership. The Content Delivery API adds this role to the principal
    // it uses to check RequiredRole, and IsInRole falls back to the principal's own
    // roles when a virtual role returns false.
    public override bool IsInVirtualRole(IPrincipal principal, object context) => false;
}

// Startup
services.AddVirtualRole<ContentApiAccessRole>("Content Api Access");
services.AddContentDeliveryApi(options =>
{
    options.RequiredRole = "Content Api Access";
});

Returning false is safe because VirtualRolePrincipal.IsInRole checks the virtual role first, then the principal's own roles. The API keeps filtering exactly as before, and no editor or visitor gains anything.

Two more things to know about roles under Opti ID:

•       Three mapped role names are reserved. The package maps CmsEditors, CmsAdmins and CommerceAdmins to Opti ID's "Content Editors", "Content Admins" and "Commerce Admins". Defining any of them again under EPiServer:Cms:MappedRoles:Items throws at startup. If your Development settings define them, keep Opti ID out of Development, as we do.

•       Site-scoped roles scope the request, not the user. A mapped role like ["OnSiteA", "CmsEditors"] with ShouldMatchAll means "any Opti ID editor, while working on site A". It doesn't stop site B's editors from qualifying. To separate editors per site, the difference has to come from the user's own roles, not from the site.

Quick diagnosis

Start from what the user sees, read the one request named below, and you will usually have the cause within minutes.

What the user sees

Request to read

What you'll find

Cause

Fix

"Verify with your password", then "Unable to sign in"

POST /idp/idx/challenge/answer

401 E0000004, no redirect-idp, password authenticator with allowedFor: none

User not provisioned into Opti ID

Check Entra provisioning logs; sweep the whole group

Signs in without a prompt, then CMS Access Denied

POST /signin-oid form body

error=access_denied, "User creation was disabled.", no code

Opti ID matched on an email that differs from the UPN

Match on UPN, or align the two values; find other affected users

Group missing from Set Access Rights

None; it's configuration

Existing rules still work

No role store outside Development

Register a virtual role for the name

Further reading

•       Opti ID: What is it and why now is a good time to use it, Jon Williams, November 2025. What Opti ID is and why to adopt it.

•       A day in the life of an Optimizely OMVP - Enabling Opti ID within your application, Graham Carr, May 2024. Adding Opti ID to a CMS 12 site.

•       Setting up Opti Id SSO with and without SCIM, Muhammad Talha, June 2026. SSO connections, domain routing and SCIM provisioning in the Admin Centre.

Nov 30, 2026

Comments

error Please login to comment.
Latest blogs
A better broken links report for Optimizely CMS 13

In May I wrote about adding exclude patterns to the Link Validation job in CMS 11. That works, but every change to the patterns needs a deploy, and...

Per Nergård (MVP) | Nov 30, 2026

Optimizely CMS 13: What Actually Changed, and Should You Upgrade Now?

Recently, while working on an Optimizely CMS 12 implementation, our clients started asking the same question again and again: “CMS 13 is out. Is...

Madhu | Nov 28, 2026 |

When MCP and Code-First Both Define a Content Type in Optimizely CMS 13

Most CMS projects define content types in C#. The CMS 13 MCP server adds a second way: an agent calls paas_cms_create_content_type and the type lan...

Adnan Zameer | Nov 25, 2026 |

Exciting New DXP Feature: Read Only SQL access for PaaS

Optimizely has just launched a feature that many of us working with CMS PaaS have been waiting for: self-serve read-only SQL access . For the first...

Scott Reed | Nov 24, 2026

SEO Manager for higher ranking

Which pages are missing an SEO title or meta description? Epicweb SEO Manager helps you find them, review AI suggestions alongside each page, and...

Luc Gosso (MVP) | Nov 24, 2026 |