---
title: 'Tutorial: How to Configure SAML with Okta'
canonical: https://openvpn.net/as-docs/tutorials/saml-okta/
product: Access Server Docs
description: This is a step-by-step guide for configuring SAML on Access Server with Okta.
---

# Tutorial: How to Configure SAML with Okta

## Overview

Access Server 2.11 and newer supports authentication using SAML with Okta as the identity provider. You can configure this in Okta with Access Server as your service provider.

The following steps walk you through enabling SAML authentication for users and groups from Okta to Access Server.

## Prerequisites

You need the following to get started:

- An [Okta account](https://www.okta.com/).
- A deployed [Access Server](https://openvpn.net/quick-start-guide/).

> **Important**
>
> We recommend using all lowercase usernames when signing in with SAML.

## Step 1: Create the Okta SAML application

With Okta, you must create a custom SAML application.

First, gather information about your Access Server as the service provider (SP).

1. Sign in to your Access Server Admin Web UI.
2. Select **Authentication → SAML**.
3. You'll need the following information:
   1. **SP Identity**.
   2. **SP ACS**.

Now that you have your SP information, you can create a new Okta SAML app and enter that information during app creation:

1. Sign in to your Okta admin dashboard.
2. From **Applications**, create a new app integration.
3. Select **SAML 2.0** and click **Next**.
4. Provide an **App name** and **App logo**, choose the **App visibility**, then click **Next**.
5. Use the SP information from Access Server to enter the following into the Okta:
   1. **Single sign on URL:** Enter the Access Server **SP ACS**.
   2. **Audience URI (SP Entity ID):** Enter the Access Server **SP Identity**.
   3. **Default RelayState:** Enter ‘cws’ for the Client Web UI or ‘profile’ to provide users with a downloadable profile. (See "How to set up IdP-initiated flow" below for more details.)
6. Click **Next**.

### Option 1: Download the Okta metadata file for automatic configuration

1. With your new app, click **View SAML setup instructions** under the **Sign On** tab.
2. Under **Optional**, select the XML and copy it, then create an XML file with the copied metadata.

### Option 2: Copy the Okta SAML data for manual configuration

1. With your new app, click **View SAML setup instructions** under the **Sign On** tab.
2. Copy the content in **Identity Provider Single Sign-On URL**, **Identity Provider Issuer**, and **X.509 Certificate**.

## Step 2: Configure Okta SAML data with Access Server

The simplest way to set up Okta SAML for Access Server is to provide the metadata XML file (option 1), but you can also manually configure it (option 2).

### Option 1: Upload the Okta metadata file in the Admin Web UI

Provide the downloaded metadata XML file to your Access Server through the Admin Web UI to automatically configure SAML:

1. Sign in to your Access Server Admin Web UI.
2. Click **Authentication \> SAML**.
3. Click **Configure Identity Provider (IdP) Automatically via Metadata** to expand the section.
4. Click **Choose File** for **Select IdP Metadata File**.
5. Select your Okta metadata XML file, click **Upload**, and click **Update Running Server**.
   - The IdP fields are now populated under **Configure Identity Provider (IdP) Manually**.

### Option 2: Manually configure Okta SAML

1. Sign in to your Access Server Admin Web UI.
2. Click **Authentication \> SAML**.
3. Click **Configure Identity Provider (IdP) Manually** to expand the section.
4. Paste the following from Okta to the Access Server fields:
   1. Paste the Okta **Identity Provider Single Sign-On URL** into Access Server’s **Sign On Endpoint**.
   2. Paste the Okta **Identity Provider Issuer** into Access Server’s **IdP EntityId**.
   3. Paste the Okta **X.509 Certificate** into Access Server’s **Certificate (PEM format)**.
5. Select **Save Settings** and **Update Running Server**.
   - The IdP fields save.

## Step 3: Assign SAML as user authentication

Once you’ve provided the SAML configuration for your IdP, you can enable it for users.

1. Sign in to the Admin Web UI.
2. Select **Authentication → SAML**.
3. Select the toggle to turn on **Enable SAML authentication**.
4. Select **Save Settings** and **Update Running Server**.

You can now enable SAML as the [global default authentication](https://openvpn.net/as-docs/tutorials/saml-default-auth.md) or for [specific groups and users](https://openvpn.net/as-docs/tutorials/saml-users-groups.md).

## Step 4: Assign the Okta app to users

You must assign this app to users or groups in Okta:

1. Sign in to the Okta admin dashboard.
2. Select your SAML app and click the **Assignments** tab.
3. Assign the SAML app to users or groups, or you can assign it to everyone:
   1. Click **Assign \> Assign to Groups**.
   2. Click **Assign** for **Everyone** and click **Done**.

All users in your organization should now have access to your Access Server SAML app.

## Optional: How to set up IdP-initiated flow

You can configure an IdP-initiated flow for signing into Access Server from Okta with the following steps:

1. Sign in to the Okta admin dashboard.
2. Click **Applications \> Applications**, and click your custom SAML app.
3. Click **General** and **edit** for SAML settings.
4. Under **2 Configure SAML**, enter one of the following for **Default RelayState**:
   1. **cws:** This directs your users to the Client Web UI after sign-in.
   2. **profile:** This directs your users to a profile download after sign-in.
5. Save changes.

Your users can now sign in to Okta and find the Access Server SAML application under **My Apps**.

## Optional: Map group access control

You can automate group assignments for access control rules using a post-authentication Python script.

Refer to the steps in this tutorial:

- [Tutorial: How to Set Up SAML Group Mapping with a Post-Auth Script](https://openvpn.net/as-docs/tutorials/tutorial--post-auth-saml-group-mapping.md)

---

Prev: [Tutorial: How to Configure SAML with Keycloak](https://openvpn.net/as-docs/tutorials/saml-keycloak.md)
Next: [Tutorial: How to Configure SAML with JumpCloud](https://openvpn.net/as-docs/tutorials/saml-jumpcloud.md)
Index: https://openvpn.net/as-docs/llms.txt
