Integrate Data Stores

You can add, modify, delete, and manage data stores in the Access Gateway Admin UI console.

You can use data stores to:

  • Augment the Access Gateway session data using external data sources, such as a database or Lightweight Directory Access Protocol (LDAP).
  • Support bidirectional synchronization between Access Gateway and external data sources.
  • Support databases (for example, MySQL, MS SQL, Oracle, and Postgres).
  • Support LDAP (for example, any LDAP V3 compliant Active Directory, Oracle Internet Directory/Unified Directory, OpenLDAP, and others).


Add a database-based Data Store

  1. Open the Access Gateway Admin UI console.
  2. Select the Settings tab.
  3. Select the Data Stores pane.
  4. Select Add () > Sql Database.

Configure a data store

After you select Sql Database, the Create New DataStore wizard starts and is initialized for database creation.

  1. Enter the following details:
    NameThe name used to identify the data store.My SQL Datastore

    Driver for datastore. Select any one of the following:

    • MySQL/MariaDB
    • PostgreSQL
    • MSSQL Server
    • OracleDB
    HostName:PortEnter the FQDN and port for the database
    DatabaseName of the database (schema) within the database.userDatabase


    Username to access the database.



    Password associated with Username.


    Advanced Query Mode

    Disabled: Specify the table name.


  2. Click Not Validated to start the validation process. OktaAccess Gateway validates the connection to the database. If the validation was successful, the button changes to Valid to show that the connection is valid.
  3. Add a Where clause that defines the join between your Okta tenant and the database.
    1. Click Add (+).

    2. In the Clause Conditions dialog box, enter the following:


      FieldThe database field to join with


      ValueThe IDP field to join against


      The Value field can contain a fixed value or a reference to a field within a data store. The most common use is ${fieldInIdP@idp}. Here, fieldInIdP represents the field used to join against the table and is from the fields available in the IDP profile.

    3. Click Save (). Repeat the previous two steps as required to add more clause conditions.
    4. Click Okay to save the data store definition.

    Define the fields used in the Where clause as attributes for the application. If you use a field that's not defined as an application attribute, it results in an error.

  4. Turn on the Active toggle to activate the data store.
  5. Test the datasource.
    1. In the row containing the data store, click Test ( ).
    2. In the Value field, enter a value that's matched in the where clause of the data store. For example, if matching on email, enter a valid email address.
    3. Click Test.
    4. On success, the data store test displays content in the Loaded Data section of the test dialog box. If no matches are found, then the dialog box doesn't display any information.

Define data store-based application attributes

  1. Select the Applications tab.
  2. In the row containing the previously created application, click Edit ( ).
  3. Select the Attributes pane.
  4. Click Add ( ) . You may need to scroll to the end of the window to see the new attribute display.
  5. Add an attribute with the following values:
    Data SourceSelect the newly added data store.
    FieldSelect one of the fields from the data store. This is the source element.
    NameSelect the name of the field. This is the target in the header and cookie.

    Repeat as required.

  6. Click Okay.
  7. Click Done.

Test the application

  1. In the row containing the application, click Goto application > SP Initiated.

  2. Sign in to your Okta tenant using a valid account.
  3. Examine the results of the test for the newly added data store based file and ensure that the returned value is correct.