Use the CData ODBC Driver for Okta from SharePoint Excel Services



This article demonstrates how to use the CData ODBC Driver for Okta to connect to Okta data from Excel in on-premises editions of SharePoint. This technique allows SharePoint users to create reports, scorecards, and dashboards featuring Okta data in Excel.

The CData ODBC Driver for Okta can be accessed using the built-in data access tools in Excel. This article demonstrates how to use the CData ODBC Driver for Okta to connect to Okta data from Excel spreadsheets in on-premises editions of SharePoint.

Connect to Okta as an ODBC Data Source

If you have not already, first specify connection properties in an ODBC DSN (data source name). This is the last step of the driver installation. You can use the Microsoft ODBC Data Source Administrator to create and configure ODBC DSNs.

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 Excel Services

Once the ODBC DSN is configured, you can configure Excel Services to use the DSN to connect. To do this, you will need to set up the OLE DB provider as a trusted data source. You will also want to decide if you want to use a Secure Store Service to enable single sign-on functionality with the ODBC driver. If you prefer, you can use the Excel Services Unattended account and skip to step 3 below.

  1. First, set up a secure store application to use single sign-on. In SharePoint Central Administration, go to Application Management -> Manage Service Applications. Select your secure store service application or create a new one. Click Manage on the Edit menu to begin editing the application.
  2. Create a new target application. You will be able to set the list of users who have access to this application. After the application is created, you will need to set the credentials on the application so that you can use this later for single sign-on.
  3. Navigate to Application Management -> Manage Service Applications in SharePoint Central Administration. Select the Excel Services application used by your organization or create one if it does not already exist. Click Manage. If you create a new app, check the option to add the service application's proxy to the farm's default proxy list.
  4. Click on Trusted Data Providers and add a new trusted provider. Set 'MSDASQL.1' for the Provider ID and leave the type as 'OLE DB'. Click OK to add this new provider to the list of trusted providers.

Connect to and Import Okta Data in Excel

After you have enabled and secured access to the DSN, you can access the data source from the ribbon in Excel.

  1. In an Excel spreadsheet, open the Data tab and click From Other Sources -> From Data Connection Wizard.
  2. Select 'Other/Advanced' for the type and on the next screen, select the 'Microsoft OLE DB Provider for ODBC Drivers'. On the Connection tab, select CData Okta Sys, the system DSN. The driver installation automatically creates matching user and system DSNs: The system DSN is needed to connect from SharePoint.
  3. Select the table you would like to connect to.
  4. On the last step of the wizard, click the 'Authentication Settings' button. Select the 'Use a stored account' and enter the name of the secure store target application you created earlier. Or, if you want to use the Unattended Service Account, select None.
  5. After you finish the wizard, the data is imported into the spreadsheet. You can now update and save Okta data directly in SharePoint.

Ready to get started?

Download a free trial of the Okta ODBC Driver to get started:

 Download Now

Learn more:

Okta Icon Okta ODBC Driver

The Okta ODBC Driver is a powerful tool that allows you to connect with live data from Okta, directly from any applications that support ODBC connectivity.

Access Okta data like you would a database - read, write, and update Okta 0, etc. through a standard ODBC Driver interface.