Okta Salesforce SSO Setup Guide – SAML 2.0 Integration

Getting Started with Okta Salesforce SSO

Most of us have been there – managing fifty different passwords is a nightmare for users and a security hole for IT. Setting up Okta Salesforce SSO is usually the first thing I recommend to clients who want to clean up their identity management. It’s a classic SAML 2.0 integration where Okta acts as the Identity Provider (IdP) and Salesforce is the Service Provider (SP). But while the theory is simple, the execution has a few “gotchas” that can eat up your afternoon if you aren’t careful.

Preparing Your Org for Okta Salesforce SSO

Before you even touch Okta, you need to get your Salesforce house in order. The first requirement is My Domain. If you haven’t enabled it yet, stop here and do that first. Salesforce needs that unique URL to create the endpoints that Okta will talk to. Without it, you won’t have an Assertion Consumer Service (ACS) URL, and the whole process stalls.

Another thing I always tell people: do this in a sandbox first. I’ve seen too many admins accidentally lock themselves out of production because they didn’t test their login policies correctly. If you’re unsure which environment to use for your initial build, check out this guide on Salesforce sandbox types to pick the right one for testing.

Setting Up the Okta Side

Now, head over to your Okta Admin dashboard. Don’t try to build a custom SAML app from scratch unless you have a very weird use case. Just search the App Catalog for “Salesforce.com”. It’s a pre-built connector that handles most of the heavy lifting for you. When it asks for the sign-in method, pick SAML 2.0 and move into the configuration tab.

Configuring the SAML Settings

This is where the real work happens. In Salesforce, go to Setup and search for “Single Sign-On Settings.” You’ll want to create a new SAML configuration. Here are the fields that actually matter for a successful Okta Salesforce SSO setup:

  • Issuer: This comes from your Okta setup. It’s usually a URL that identifies your Okta org.
  • Entity ID: Use your My Domain URL or https://saml.salesforce.com.
  • SAML Identity Type: I almost always use “Assertion contains the Federation ID from the User object.” It’s much cleaner than using usernames, especially if your usernames don’t match exactly between systems.
  • Identity Location: Usually “Subject confirms the NameIdentifier element.”

One thing that trips people up is the certificate. Okta gives you a certificate, but sometimes you have to manually format it. If you’re looking at a raw block of text from a metadata file, you need to wrap it with BEGIN CERTIFICATE and END CERTIFICATE lines before Salesforce will accept it as a .crt file. I’ve spent way too long debugging an integration only to realize the certificate was missing those two simple lines.

Wiring the Systems Together

Once you’ve saved your settings in Salesforce, you’ll get a few URLs back, specifically the Login URL. You need to take that back to Okta and paste it into their “Sign-On” settings. This tells Okta exactly where to send the user after they’ve authenticated. If you get this wrong, users will authenticate in Okta and then hit a 404 page in Salesforce.

Mapping Your Users

Here’s the thing: SSO won’t work if Salesforce doesn’t know who the Okta user is. You have to map them. Go to a User record in Salesforce and find the “Federation ID” field. This value must match whatever Okta is sending – usually the Okta username or email. If these don’t match, you’ll just see a generic “SAML Heading Error” and a very frustrated user. If you have a lot of users, look into automating this with SCIM so you aren’t manually typing Federation IDs all day.

Updating the Login Page

So, you’ve done the backend work, but users still see the old login screen. You need to go to “My Domain” settings in Salesforce, click Edit under “Authentication Configuration,” and check the box for your new Okta SSO provider. Now, when users hit your login page, they’ll see an “Okta” button. Or, if you’re feeling bold, you can disable the standard login form entirely to force everyone through Okta.

Key Takeaways for Okta Salesforce SSO

  • Federation ID is King: 90% of SSO failures are just typos in the Federation ID field. Match them exactly.
  • Watch Certificate Expiry: Put a calendar reminder for when your certificates expire. When they die, the integration dies, and nobody can log in.
  • Keep an Admin Backdoor: Always keep at least one admin account that can log in via the standard login.salesforce.com URL. This is your “break glass” account if the SSO config breaks.
  • Test the Validator: Use the SAML Assertion Validator in Salesforce Setup. It tells you exactly why a login failed.

Common Troubleshooting Tips

When things go sideways, don’t panic. The first place I look is the SAML Assertion Validator in Salesforce Setup. You can paste the XML response from Okta, and Salesforce will tell you exactly why it rejected the login. Is the timestamp off? Is the recipient URL wrong? This tool tells you. Also, double-check that your My Domain is actually deployed to users, or the ACS URL won’t be reachable by Okta’s servers.

Setting up Okta Salesforce SSO isn’t just about convenience; it’s about making your org more secure. Once you get the hang of the certificate exchange and the user mapping, you’ll find it’s a pretty repeatable process. Just take it slow, test in your sandbox, and verify those Federation IDs before you flip the switch for the whole company.