Prerequisites
- Admin access to your Modelcode organization, signed in with email and password — the SSO settings page is not available to users who signed in with a social provider (GitHub, GitLab, Microsoft)
- An Okta admin account with privileges to create and edit applications and policies
SAML 2.0
Step 1: Get Modelcode’s Service Provider Details
Before creating the Okta application, get the SP details from Modelcode:- In Modelcode, navigate to Single Sign-On in the sidebar
- Click Setup SSO and select SAML 2.0
- Copy the ACS URL and SP Entity ID displayed on the form
Step 2: Create a SAML Application in Okta
- In the Okta Admin Console, go to Applications → Applications
- Click Create App Integration
- Select SAML 2.0 and click Next
General Settings
Click Next.
SAML Settings
Leave other fields at their defaults and click Next.
Feedback
Select I’m an Okta customer adding an internal app and click Finish.Attribute Statements
After the application is created, go to the Sign On tab and add the following attribute statements so Modelcode receives the user’s profile information in the SAML assertion:Step 3: Get Okta’s Identity Provider Details
After creating the application:- Go to the Sign On tab of your new Okta application
- Find the Metadata URL — this is typically labeled “Metadata URL” or available via a link like “Identity Provider metadata”
- Copy the Metadata URL
Step 4: Configure SAML in Modelcode
- In Modelcode, navigate to Single Sign-On in the sidebar
- Click Setup SSO (or Edit if updating)
- Select SAML 2.0 as the protocol
- Choose your configuration method:
- Metadata URL (Recommended)
- Manual Configuration
Paste the Metadata URL from Okta. Modelcode automatically extracts all required IdP details.
- Click Verify & Save
Step 5: Assign Users and Share the Portal Link
- In Okta, go to your Modelcode application’s Assignments tab
- Assign individual users or groups
- In Modelcode, go to the Members page and invite each user who needs SSO access — users cannot sign in via SSO until they have been invited
- Copy the Portal Link from the SSO settings page and share it with your team:
OpenID Connect
Step 1: Create a Web Application in Okta
- In the Okta Admin Console, go to Applications → Applications
- Click Create App Integration
- Select OIDC - OpenID Connect as the sign-in method
- Select Web Application as the application type
- Click Next
General Settings
- Click Save
Step 2: Find Your Issuer URL
The Issuer URL tells Modelcode where to find Okta’s OIDC discovery document.- In the Okta Admin Console, navigate to Security → API in the left sidebar
- Click on the Authorization Servers tab
- Click on your authorization server (usually named default)
- Under the Settings tab, find the Issuer field
- Copy the Issuer URL
Step 3: Add an Access Policy
Your Okta authorization server must have an access policy that allows your Modelcode application to request tokens. Without a policy (or a matching rule), Okta rejects the login attempt.- In the Okta Admin Console, navigate to Security → API
- Click on your authorization server (e.g., default)
- Select the Access Policies tab
- If no policy exists, click Add Policy:
- Name:
Modelcode SSO(or any descriptive name) - Assign to: All clients, or select The following clients and enter your Modelcode application name
- Click Create Policy
- Name:
- Inside the policy, click Add Rule:
- Name:
Allow login(or any descriptive name) - Grant type: Ensure Authorization Code is selected
- Leave other fields at their defaults
- Click Create Rule
- Name:
If your authorization server already has a policy that covers all clients or includes your Modelcode application, you can skip this step.
Step 4: Configure OIDC in Modelcode
- In Modelcode, navigate to Single Sign-On in the sidebar
- Click Setup SSO (or Edit if updating)
- Select OpenID Connect as the protocol
- Enter the following:
- Click Verify & Save
Step 5: Assign Users and Share the Portal Link
- In Okta, go to your Modelcode application’s Assignments tab
- Assign individual users or groups
- In Modelcode, go to the Members page and invite each user who needs SSO access — users cannot sign in via SSO until they have been invited
- Copy the Portal Link from the SSO settings page and share it with your team:
Troubleshooting
SAML: “Verification failed” when saving the Metadata URL
- Confirm the Metadata URL uses HTTPS and is publicly reachable
- Try accessing the Metadata URL in your browser to verify it returns XML
- If the URL is behind a firewall, use manual configuration instead
SAML: Users see a SAML error after authenticating
- Verify the Single sign-on URL in Okta matches the ACS URL from Modelcode exactly
- Confirm the Audience URI in Okta matches the SP Entity ID from Modelcode exactly
- Check that Name ID format is set to
EmailAddress - Ensure the user is assigned to the application in Okta
SAML: Certificate rotation
When Okta rotates signing certificates:- If using Metadata URL: Modelcode fetches the latest metadata on each authentication attempt, so certificate rotation is handled automatically
- If using manual configuration: Update the signing certificate in the Modelcode SSO settings after Okta rotates
OIDC: “Verification failed” when saving
- Confirm the Issuer URL matches the Issuer field from your Okta authorization server
- Verify the URL uses HTTPS and is publicly reachable
- Check that the authorization server is active in Okta
OIDC: Users see an error after authenticating
- Verify the Sign-in redirect URI in Okta matches the Callback URL from Modelcode exactly
- Confirm the application type is Web Application (not SPA or Native)
- Check that the Grant type includes Authorization Code
- Ensure the authorization server has an access policy that covers your application
- Ensure the user is assigned to the application in Okta
Users authenticate but are not recognized in Modelcode
- The user’s email in Okta must match their Modelcode account email
- Ensure users are accessing Modelcode through the Portal Link, not the standard login page
- If the user hasn’t been invited to the organization yet, the admin must send an invitation first