<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
System Status
Announcements
Announcements
Search
Search
Select Language
0D5WR00002Yuuw40ABOkta Classic EngineSingle Sign-OnAnswered2026-12-04T17:32:09.000Z2026-12-04T17:30:44.000Z2026-12-04T17:32:09.000Z

Mihai N. (Okta, Inc.) asked a question.

SAML 2.0 Certificate Rotation: Updating expiring IdP/SP certificates without causing application downtime.

Ten Okta SAML 2.0 certificate rotation issues from Okta Support Knowledge Base articles and official documentation, along with their verified resolutions:


Paul S. likes this.
  • Mihai N. (Okta, Inc.)

    1. Immediate SSO Outage From Activating a New Signing Certificate Before Updating the SP

    • Issue: Okta intentionally enforces manual rollover rather than automatic rotation because activating a new signing certificate immediately breaks trust with any Service Provider (SP) that has not yet registered it. In Office 365 WS-Federation Manual using PowerShell setups, activating a newly generated certificate in Okta before registering it in Microsoft Entra ID immediately breaks all Office 365 logins. 
    • Solution: Click Generate New Certificate (which creates the key in an Inactive state while leaving the current key Active), download the new certificate or metadata, and upload/register it in the SP first (schedule a maintenance window if the SP supports only one active certificate). For Office 365 Manual WS-Fed, back up your current config with Get-MgDomainFederationConfiguration, run the PowerShell script from View Setup Instructions using the new X509Certificate string with all spaces stripped (or migrate to WS-Federation Automatic), then click Activate in Okta and allow 5 minutes for propagation. 
    • Verification: Sign in to the SP in a fresh Incognito session after activation and confirm authentication succeeds with no signature validation errors.

    2. Unable to activate key (E0000039) When Rotating Certificates on OIN Apps With Blank SAML Fields

    • Issue: Clicking Actions → Activate on a newly generated signing certificate fails with Unable to activate key and API error E0000039: Operation on application settings failed (acsURL: The field cannot be left blank / entityID: The field cannot be left blank), documented specifically on AWS IAM Identity Center integrations. 
    • Solution: Open Applications → Applications → [App] → General, click Edit, populate all required SAML fields (such as AWS SSO ACS URL and AWS SSO issuer URL), click Save, then return to Sign On → SAML Signing Certificates and activate the certificate. 
    • Verification: The certificate status changes to Active without throwing E0000039.

    3. Error: Could not upload certificate When Replacing an SP Encryption or SLO Certificate

    • Issue: Uploading a rotated Service Provider public certificate for Assertion Encryption or Single Logout (SLO) fails with Error: Could not upload certificate due to bad file formatting, rich-text characters, or spaces introduced while copying and pasting. 
    • Solution: Open a plain-text editor, remove all extraneous spaces from the Base64 X.509 certificate body, wrap the value strictly between -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----, save with a .cer extension, and re-upload. 
    • Verification: Okta saves the uploaded filename in the app's Advanced SAML Settings with no upload error banner.

    4. Inbound SAML Outage (Digital signature in the SAML response did not validate) During External IdP Rotation

    • Issue: When Okta acts as the SP for an external SAML 2.0 IdP (such as Microsoft Entra ID), Okta historically lacked an automatic dual-certificate grace period—causing immediate Unable to validate incoming SAML Assertion failures the moment the external IdP switched to a new signing certificate. 
    • Solution: If the Multiple Active IdP Signing Certificates Early Access feature is enabled on your org, navigate to Security → Identity Providers → [IdP] → Edit → SAML Protocol Settings → IdP Signature Certificate → Additional certificate (optional) to upload the second certificate before the external IdP activates it (up to two concurrent active certificates are supported). Without that feature enabled, coordinate a brief cutover window and replace the cert in the UI (click X to remove the old cert and upload the new Base64 cert) or via API (POST /api/v1/idps/credentials/keys to get the new kid, then PUT /api/v1/idps/{idpId}). 
    • Verification: Authenticate through the external IdP in an Incognito browser and check Okta System Logs to confirm no Unable to validate incoming SAML Assertion failures occur.

    5. HTTP 400 BAD REQUEST: Error encrypting SAML assertion After Updating an SP Encryption Certificate

    • Issue: Rotating an expiring SP encryption certificate triggers HTTP 400 BAD REQUEST: Your request resulted in an error. Error encrypting SAML assertion when the replacement certificate lacks required key usages, uses a weak algorithm/key size, has an out-of-order chain, or violates FIPS settings on FIPS-enforced tenants.
    • Solution: Verify the replacement certificate includes both Digital Signature and Key Encipherment key usages, uses at least RSA-2048 and SHA-256, and orders any certificate chain strictly as Entity → Intermediary → Root CA; if your Okta org enforces FIPS compliance, set Encryption Algorithm to AES256-GCM.
    • Verification: Initiate a SAML login and verify Okta issues the encrypted assertion without returning HTTP 400.

     

    Expand Post
  • Mihai N. (Okta, Inc.)

    6. SLO Failure: Invalid Signature After Renewing Certificates on Apps Using Single Logout

    • Issue: Certificate renewal breaks SAML Single Logout with SLO failure: Invalid Signature because either the wrong keypair/hashing algorithm is configured on one side, or an admin mistakenly uploads Okta's IdP certificate into Okta's Signature Certificate field instead of the Service Provider's signing certificate.
    • Solution: Upload the Service Provider's updated public signing certificate (the cert corresponding to the private key the SP uses to sign LogoutRequest messages) into the app's Signature Certificate field in Okta, confirm the signature hashing algorithm matches on both sides, and verify the SP signs the entire LogoutRequest message.
    • Verification: Trigger an SP-initiated Single Logout and inspect Okta System Logs to confirm the logout completes without SLO failure: Invalid Signature.

    7. Legacy Org-Wide Certificates Creating Multi-App Expiration Blast Radius

    • Issue: SAML apps created prior to Okta's May 2022 per-app certificate change—and Office 365 integrations created prior to version 2026.08.0 (many expiring in early 2027)—rely on a shared org-wide certificate, displaying a "Security risk. The active certificate is scoped to your whole org" alert and risking simultaneous multi-app expirations. 
    • Solution: Migrate each legacy app to an app-scoped certificate ahead of expiry by clicking Generate new certificate on each app's Sign On tab, providing the new app-specific certificate/metadata to that SP, and activating it app by app. 
    • Verification: Confirm the "Security risk" org-wide certificate warning banner disappears on each migrated app's Sign On tab.

    8. Cloned/Shared Certificates Staying Inactive After POST /clone (and Failing to Sync Paired Apps)

    • Issue: Multi-instance SAML setups pointing to one SP (such as Google Workspace shared accounts) share one signing certificate via the API. Two rotation errors occur regularly: rotating the certificate on App 1 leaves App 2 signing with the old key, and calling POST /api/v1/apps/{app1ID}/credentials/keys/{kid}/clone?targetAid={app2ID} only makes the new key available on App 2 without activating it. 
    • Solution: Generate and activate the new certificate on App 1, run the /clone API call to copy the new kid to every target app, and then explicitly activate the cloned certificate on each target app via the Sign On tab or by updating the app's key credential via API. 
    • Verification: Confirm every paired app instance shows the exact same active certificate thumbprint/expiration date on its Sign On tab.

    9. False Confidence From Okta Allowing Expired External IdP Certs—While Strict SPs Hard-Fail

    • Issue: When Okta acts as the SP, Okta intentionally allows SAML SSO to continue functioning even after an external IdP's signature certificate expires (flagging the expiration date in red) to prevent mass lockouts. Teams who see expired external certs keep working often assume downstream SPs behave identically—or overlook Okta's 60-day Admin Console → Tasks expiration reminder—resulting in hard outages on strict SPs like Microsoft 365, which immediately reject assertions signed by expired certificates.
    • Solution: Never rely on expired-certificate grace behavior for outbound SAML apps; monitor the 60-day Tasks alerts and proactively export all app and IdP certificate expiration dates to schedule rotations well ahead of expiry.
    • Verification: Confirm no production app or external IdP shows a red expired date or overdue certificate task under Admin Console → Tasks.

    10. API Certificate Updates (PUT /api/v1/apps/{appId}) Resetting OIN Settings—or Breaking Legacy SHA-1 SPs / Invalid Validity Ranges

    • Issue: Using the Apps API during certificate rotation triggers three documented failures: (1) sending an incomplete PUT /api/v1/apps/{appId} body for an OIN app (omitting federated domains, federation method, or SSO settings) resets the OIN app to default values; (2) rotating a legacy app onto a newly generated SHA-256 certificate breaks legacy SPs that only support SHA-1; and (3) generating custom-lifetime certs outside 2–10 years fails with Validity years out of range. It should be 2 - 10 years.
    • Solution: Always retrieve the full current app payload via GET /api/v1/apps/{appId} and include all OIN-specific settings before running a PUT to switch credentials.signing.kid (or reverting to a legacy SHA-1 kid if required by a legacy SP), and constrain validityYears strictly to 2–10 on /credentials/keys/generate.

    • • Verification: Run a follow-up GET /api/v1/apps/{appId} after the PUT to confirm OIN settings remain intact and credentials.signing.kid matches the target certificate.

    Expand Post

Loading
SAML 2.0 Certificate Rotation: Updating expiring IdP/SP certificates without causing application downtime.
Okta Support Agent (Beta)

Terms of Service

Hello! I'm the Okta Support Agent (Beta), your go-to resource for questions about Okta products. Please remember for your security and privacy, do not share any Personally Identifiable Information (PII) such as passwords, IP addresses, or other details with me.

Okta Privacy Policy and Terms of Service apply