Excel Add-In for WordPress

Build 26.0.9770

Establishing a Connection

Configure a Connection Profile

From the CData ribbon, click Get Data and select From WordPress connection/s to launch the CData Query window. To setup a new connection, you will have to click the New WordPress Connection button. Here you can set the connection settings, test the connection, and save the connection profile.

Connecting to WordPress

The CData Excel Add-In for WordPress supports connecting to self-hosted WordPress instances and WordPress Online instances.

Connecting to Self-Hosted WordPress

To connect to a self-hosted WordPress instance, provide the full URL for your WordPress site, and then authenticate as described below. For example, if your site is hosted at http://localhost/wp/wordpress, you should enter it as http://localhost/wp/wordpress, not just http://localhost. Failing to provide the complete URL will lead to a 'site not found' error.

Self-hosted WordPress instances support the following types of authentication methods:

  • Basic (recommended for use in testing environments)
  • OAuth (supports secure, browser-based access from various platforms, including desktop applications, web applications, and headless machines)
  • OAuth Client
  • Okta
  • Azure AD
  • PingFederate
Note: Choose the method that fits your needs based on the environment and level of security required.

Basic Authentication

Before you configure WordPress to use Basic Authentication, follow these guidelines:

  • Ensure that your WordPress login has administrative privileges.
  • Be aware of the version of WordPress running on the local host. Note: Versions 4.7 and later support the WordPress REST API natively, while earlier versions require a Basic Authentication plug-in to secure REST API access.

To configure Basic Authentication:

  1. Log into your WordPress host.
  2. If you are running an earlier WordPress version than 4.7, install the REST API plugin.
  3. Install the Basic Authentication plugin.
  4. To create custom taxonomies, install the Simple Taxonomy Refreshed plugin.
    If you prefer installing the plugins manually, extract the compressed folders to the wp-content\plugins folder and then enable the plugins via the WordPress admin interface.
  5. Next, set the following connection properties:

You are now ready to connect.

OAuth Authentication

For all non-testing environments, WordPress supports OAuth authentication only. To enable this authentication from all OAuth flows, you must set AuthScheme to OAuth, and you must create a custom OAuth application, as described in Creating a Custom OAuth Application.

The following subsections describe how to authenticate to WordPress from three common authentication flows. For a complete list of connection string properties available in WordPress, see Connection.

Desktop Applications

To authenticate with the credentials for a custom OAuth application, you must get and refresh the OAuth access token. After you do that, you are ready to connect.

Get and refresh the OAuth access token:

When you connect, the add-in opens WordPress's OAuth endpoint in your default browser. Log in and grant permissions to the application.

When the access token expires, the add-in refreshes it automatically.

Automatic refresh of the OAuth access token:

To have the add-in automatically refresh the OAuth access token, do the following:

  1. Before connecting to data for the first time, set the following connection properties:
  2. On subsequent data connections, set the following:

OAuth Client Authentication

The client credentials grant type allows authentication from desktop applications or the web. This method requires you to create a custom OAuth application, as described in Creating a Custom OAuth Application.

To connect, set these properties:

  • AuthScheme: OAuthClient.
  • InitiateOAuth: GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the access token in the connection string.
  • OAuthClientId: The client Id assigned when you registered your application.
  • OAuthClientSecret: The client secret assigned when you registered your application.

Okta

To connect to Okta, set these properties:

  • AuthScheme: Okta.
  • User: The authenticating Okta user.
  • Password: The password of the authenticating Okta user.
  • SSOLoginURL: The SSO provider's login URL.
  • SSOExchangeURL: The url used for the exchange of the SAML token for WordPress credentials. This is optional and if it is NULL WordPress will construct it.

If you are either using a trusted application or proxy that overrides the Okta client request OR configuring MFA, you must use combinations of SSOProperties to authenticate using Okta. Set any of the following, as applicable:

  • APIToken: When authenticating a user via a trusted application or proxy that overrides the Okta client request context, set this to the API Token the customer created from the Okta organization.
  • MFAType: If you have configured the MFA flow, set this to one of the following supported types: OktaVerify, Email, or SMS.
  • MFAPassCode: If you have configured the MFA flow, set this to a valid passcode.
    If you set this to empty or an invalid value, the add-in issues a one-time password challenge to your device or email. After the passcode is received, reopen the connection where the retrieved one-time password value is set to the MFAPassCode connection property.
  • MFARememberDevice: True by default. Okta supports remembering devices when MFA is required. If remembering devices is allowed according to the configured authentication policies, the add-in sends a device token to extend MFA authentication lifetime. If you do not want MFA to be remembered, set this variable to False.

Example connection string:

AuthScheme=Okta;SSOLoginURL='https://example.okta.com/home/appType/0bg4ivz6cJRZgCz5d6/46';User=oktaUserName;Password=oktaPassword;URL=YourWordpressSiteURL;

Azure AD

This configuration requires two separate Azure AD applications:

  • The "WordPress" application used for single sign-on (SSO), and
  • A custom OAuth application with user_impersonation permission on the Azure Active Directory.

To connect to Azure AD, set the AuthScheme to AzureAD, and set these properties:

  • SSOExchangeURL: The url used for the exchange of the SAML token for WordPress credentials. This is optional and if it is NULL WordPress will construct it.
  • OAuthClientId: The application Id of the connector application, listed in the Overview section of the app registration.
  • OAuthClientSecret: The client secret value of the connector application. Azure AD displays this when you create a new client secret.
  • CallbackURL: The redirect URI of the connector application. For example: https://localhost:33333.

To authenticate to Azure AD, set these required properties in SSOProperties:

  • Resource: The application Id URI of the WordPress application, listed in the app registration's Overview section. In most cases this is the URL of your custom WordPress domain.
  • AzureTenant: The Id of the Azure AD tenant where the applications are registered.

Example connection string:

AuthScheme=AzureAD;URL=YourWordpressSiteURL;OAuthClientId=3ea1c786-d527-4399-8c3b-2e3696ae4b48;OauthClientSecret=xxx;CallbackUrl=https://localhost:33333;SSOProperties='Resource=https://YourWordpressSite/wp-content/plugins/miniorange-saml-20-single-sign-on;AzureTenant=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
You are now ready to connect.

PingFederate

Before connecting, ensure that your WordPress site is configured with a PingFederate SSO plugin and that the authenticating user is provisioned in the PingFederate Data Store.

Then, set the following connection properties:

  • AuthScheme: PingFederate.
  • User: The PingFederate user. You must also add this user to PingFederate Data Stores. When connecting with a browser, you are redirected to the PingFederate login page to complete authentication.
  • Password: The PingFederate user's password.
  • SSOLoginURL: The PingFederate SSO login URL.
  • SSOExchangeURL (optional): The URL used for exchanging the SAML token for WordPress credentials. If not provided, the add-in attempts to construct it automatically.

Example connection string:

AuthScheme=PingFederate;URL=https://yourwordpresssite.com;User=myuser@mydomain;Password=mypassword;SSOLoginURL=https://idp.example.com/idp/startSSO.ping;

Connecting to WordPress Online

WordPress Online supports two types of authentication methods:

  • OAuth 2.0
  • OAuth Password

OAuth 2.0 Authentication

OAuth 2.0 is a protocol that allows applications to interact with blogs on WordPress, Your Way, and self-hosted WordPress sites running Jetpack.

The two authentication endpoints are the authorization endpoint and the token request endpoint.

  • https://public-api.wordpress.com/oauth2/authorize
  • https://public-api.wordpress.com/oauth2/token

Before you begin, you must create and register a custom OAuth application with WordPress.com, as described in Creating a Custom OAuth Application. This application provides the client Id, client secret, and redirect URI required to authenticate your application and verify API calls. You can create or manage your applications in the WordPress Applications Manager.

When you are ready to connect, set the following connection properties:

You can also set the following optional property:

  • Scope: Defines the level of access that the authentication token grants to your application. Depending on the value set (or omitted), different access is allowed. Supported values include:
    • Auth: Grants access to /me endpoints for WordPress.com Connect.
    • Global: Grants full access to all the blogs associated with the user's account, including any Jetpack-connected sites. If omitted, access is limited to a single blog.

OAuth Password Authentication

Set the following connection properties:

  • Schema: WordPressOnline.
  • AuthScheme: OAuthPassword.
  • URL: Your WordPress Online URL.
  • OAuthClientId: The client Id assigned when you registered your custom OAuth application.
  • OAuthClientSecret: The client secret assigned when you registered your custom OAuth application.
  • User: Your username.
  • Password: Your password.

Example connection strings:

AuthScheme=OAuthPassword;Schema=WordPressOnline;URL=https://example.wordpress.com;OAuthClientId=yourClientId;OAuthClientSecret=yourClientSecret;User=yourUser;Password=yourPassword;

AuthScheme=OAuth;Schema=WordPressOnline;URL=https://example.wordpress.com;InitiateOAuth=GETANDREFRESH;OAuthClientId=yourClientId;OAuthClientSecret=yourClientSecret;

Connection Properties

The Connection properties describe the various options that can be used to establish a connection.

Managing Connections

After successfully authenticating to WordPress you will be able to customize the data you are importing. To learn more about this, see Managing Connections.

See Also

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9770