How to bring down your SitecoreAI back end with bad parameters

TL;DR

  • Don’t set SITECORE_SPE_ELEVATION environment variable to Allow – it will break your environment on redeploy.
  • If you already have and your environment is down, set it back to Confirm and redeploy.

What happened

I set the SITECORE_SPE_ELEVATION environment variable on a (sandbox!) SitecoreAI environment to Allow (to stop getting prompted for elevation when running SPE scripts) and triggered a redeploy, as required for environment variable changes to take effect.

The redeploy brought the environment down. I could get into the SitecoreAI dashboard for the environment but I could not access my content, Page Builder, or the Desktop (found in the Settings).

The fix

Set SITECORE_SPE_ELEVATION back to Block or Confirm and redeploy. That’s it!

Why this is worth knowing

SITECORE_SPE_ELEVATION controls how the Sitecore PowerShell Extension (SPE) module handles permissions for running scripts. The three values are:

  • Block (default) — always blocks elevated sessions
  • Confirm — prompts for confirmation before elevating
  • Allow — always allows elevation, no prompt

Sitecore’s own docs mark Allow with a “Danger” callout, but don’t go into detail on what can break. In my case, it wasn’t just a scripting speed bump, it stopped the environment from redeploying successfully at all.

In short, only use Allow on a local docker-ized environment!