500 Error using OpenID/Azure AD

Product: PowerShell Universal
Version: 2.3

I had this working in my environment and then I rebuilt my server and forgot to make a backup of my appsettings.json file. Now, I am struggling getting it working again.

Here are my settings:
“OIDC”: {

  "Enabled": "true",

  "CallbackPath": "/auth/signin-oidc",

  "ClientID": "ea384379....",

  "ClientSecret": "secrethere",

  "Resource": "",

  "Authority": "https://login.microsoftonline.com/tenantID",

  "ResponseType": "code",

  "SaveTokens": "false",

  "CorrelationCookieSameSite": "",

  "UseTokenLifetime": true,

  "Scope": "openid profile groups"

},

When I go to the page, I get the proper authentication prompts and then end up at a blank page with this URL: https://addresshere/auth/signin-oidc

I see a page 500 error. Am I missing something obvious? I’ve actually tried this on a couple of different servers, connecting to a couple of different tenants.

Do you have HTTPS enabled for your PSU instance? This 500 error can happen because of restrictions in Chromium based browsers when PSU doesn’t have HTTPS enabled. Look for “Correlation failed” in the log.