How to Import Okta Data into SQL Server using SSIS



Easily back up Okta data to SQL Server using the SSIS components for Okta.

Using SQL Server as a backup for critical business data provides an essential safety net against loss. Backing up data to SQL Server enables business users to more easily connect that data with features like reporting, analytics, and more.

This example demonstrates how to use the CData SSIS Tasks for Okta inside of a SQL Server SSIS workflow to transfer Okta data into a Microsoft SQL Server database.

Add the Components

To get started, add a new Okta source and SQL Server ADO.NET destination to a new data flow task.

Create a New Connection Manager

Follow the steps below to save Okta connection properties in a connection manager.

  1. In the Connection Manager window, right-click and then click New Connection. The Add SSIS Connection Manager dialog is displayed.
  2. In the Connection Manager type menu, select Okta. The CData Okta Connection Manager is displayed.
  3. Configure connection properties.

    To connect to Okta, set the Domain connection string property to your Okta domain.

    You will use OAuth to authenticate with Okta, so you need to create a custom OAuth application.

    Creating a Custom OAuth Application

    From your Okta account:

    1. Sign in to your Okta developer edition organization with your administrator account.
    2. In the Admin Console, go to Applications > Applications.
    3. Click Create App Integration.
    4. For the Sign-in method, select OIDC - OpenID Connect.
    5. For Application type, choose Web Application.
    6. Enter a name for your custom application.
    7. Set the Grant Type to Authorization Code. If you want the token to be automatically refreshed, also check Refresh Token.
    8. Set the callback URL:
      • For desktop applications and headless machines, use http://localhost:33333 or another port number of your choice. The URI you set here becomes the CallbackURL property.
      • For web applications, set the callback URL to a trusted redirect URL. This URL is the web location the user returns to with the token that verifies that your application has been granted access.
    9. In the Assignments section, either select Limit access to selected groups and add a group, or skip group assignment for now.
    10. Save the OAuth application.
    11. The application's Client Id and Client Secret are displayed on the application's General tab. Record these for future use. You will use the Client Id to set the OAuthClientId and the Client Secret to set the OAuthClientSecret.
    12. Check the Assignments tab to confirm that all users who must access the application are assigned to the application.
    13. On the Okta API Scopes tab, select the scopes you wish to grant to the OAuth application. These scopes determine the data that the app has permission to read, so a scope for a particular view must be granted for the driver to have permission to query that view. To confirm the scopes required for each view, see the view-specific pages in Data Model < Views in the Help documentation.

Configure the Okta Source

Follow the steps below to specify the query to be used to extract Okta data.

  1. Double-click the Okta source to open the source component editor.
  2. In the Connection Manager menu, select the connection manager previously created.
  3. Specify the query to use for the data extraction. For example: SELECT Id, ProfileFirstName FROM Users WHERE Status = 'Active'
  4. Close the Okta Source control and connect it to the ADO.NET Destination.

Configure the SQL Server Destination

Follow the steps below to specify the SQL server table to load the Okta data into.

  1. Open the ADO.NET Destination and add a New Connection. Enter your server and database information here.
  2. In the Data access mode menu, select "table or view".
  3. In the Table Or View menu, select the table or view to populate.
  4. Configure any properties you wish to on the Mappings screen.

Run the Project

You can now run the project. After the SSIS Task has finished executing, your database will be populated with Okta data.

Ready to get started?

Download a free trial of the Okta SSIS Component to get started:

 Download Now

Learn more:

Okta Icon Okta SSIS Components

Powerful SSIS Source & Destination Components that allows you to easily connect SQL Server with Okta through SSIS Workflows.

Use the Okta Data Flow Components to synchronize with Okta 0, and more. Perfect for data synchronization, local back-ups, workflow automation, and more!