Using a Connection String

For some applications, you might need to use a connection string to connect to your data source. For detailed information about how to use a connection string in an ODBC application, refer to the documentation for the application that you are using.

The connection strings in the following sections are examples showing the minimum set of connection attributes that you must specify to successfully connect to the data source. Depending on the configuration of the data source and the type of connection you are working with, you might need to specify additional connection attributes. For detailed information about all the attributes that you can use in the connection string, see Driver Configuration Options.

Note:

If the server does not support HTTPS connections or SSL verification, then you must disable those features by setting additional properties in your connection string. For more information, see Configuring SSL Verification.

DSN Connection String Example

The following is an example of a connection string for a connection that uses a DSN:

DSN=[DataSourceName]

[DataSourceName] is the DSN that you are using for the connection.

You can set additional configuration options by appending key-value pairs to the connection string. Configuration options that are passed in using a connection string take precedence over configuration options that are set in the DSN.

DSN-less Connection String Example

Some applications provide support for connecting to a data source using a connector without a DSN. To connect to a data source without using a DSN, use a connection string instead.

The placeholders in the example are defined as follows, in alphabetical order:

  • [BaseURL] is the region-based host required to retrieve the access token.
  • [InstanceURL] is the URL of the Concur instance that you are connecting to.
  • [YourAccessToken] is your access token for authenticating to Concur.
  • [YourClientID] is the client ID associated with your Concur application.
  • [YourPassword] is the password corresponding to your Concur user name.
  • [YourPath] is the full path of the .pem file containing trusted CA certificates for verifying the server during SSL authentication.
  • [YourUserName] is the user name that you use to access Concur.

Connecting to Concur Using an Access Token

The following is the format of a DSN-less connection string for connecting to Concur using the new OAuth 2.0 Bearer access token:

Driver=Simba Concur ODBC Driver;Host=[InstanceURL];Auth_Base_URL=[BaseURL];Auth_Type=OAuth_2.0_Bearer;Auth_AccessToken=[YourAccessToken]

For example:

Driver=Simba Concur ODBC Driver;Host=www.concursolutions.com;Auth_Base_URL=us.api.concursolutions.com;Auth_Type=OAuth_2.0_Bearer;Auth_AccessToken=kN9PcyQ9prK4LvUMMMpFL4R+lVE=

The following is the format of a DSN-less connection string for connecting to Concur using the old OAuth access token:

Driver=SimbaConcur ODBC Driver;Host=[InstanceURL];Auth_Type=OAuth_2.0;Auth_AccessToken=[YourAccessToken]

For example:

Driver=SimbaConcur ODBC Driver;Host=www.concursolutions.com;Auth_Type=OAuth_2.0;Auth_AccessToken=kN9PcyQ9prK4LvUMMMpFL4R+lVE=

Access tokens are valid for a limited amount of time only. If you provide an Auth_AccessToken value and a refresh token in addition to your Concur application information, the connector can refresh the access token when it expires. Note that, in this case, the Auth_AccessToken value can be any placeholder value.

For example, if you are using the new OAuth 2.0 Bearer access token:

Driver=Simba Concur ODBC Driver;Host=www.concursolutions.com;Auth_Base_URL=us.api.concursolutions.com;Auth_Type=OAuth_2.0_Bearer;Auth_AccessToken=kN9PcyQ9prK4LvUMMMpFL4R+lVE;Auth_RefreshToken=rP78cyQ7prE7LwUerMpFQ4Y+98w;Auth_Client_ID=f145kn9Pcyq9pr4lvumdapfl4rive;Auth_Client_Secret=4MIIEowIBAAKCAQEA18f3PhzSxNF8kSHGphg9WWR8iXj

As another example, if you are using the old OAuth 2.0 access token:

Driver=Simba Concur ODBC Driver;Host=www.concursolutions.com;Auth_Type=OAuth_2.0;Auth_AccessToken=kN9PcyQ9prK4LvUMMMpFL4R+lVE;Auth_RefreshToken=rP78cyQ7prE7LwUerMpFQ4Y+98w;Auth_Client_ID=f145kn9Pcyq9pr4lvumdapfl4rive;Auth_Client_Secret=4MIIEowIBAAKCAQEA18f3PhzSxNF8kSHGphg9WWR8iXj

Connecting to Concur Using New Authentication with an OAuth 2.0 Bearer Token

The following is the format of a DSN-less connection string for connecting to Concur using your new authentication type with the OAuth 2.0 Bearer token. The connector initiates an OAuth 2.0 Bearer authentication flow based on your client ID and client secret, and then uses the retrieved access token to authenticate the connection.

Driver=Simba Concur ODBC Driver;Auth_Base_URL=[BaseURL];Host=[InstanceURL];UID=[UserName];PWD=[Password];Auth_Type=OAuth_2.0_Bearer;Auth_Client_ID=[YourClientID];Auth_Client_Secret=[YourClientSecret]

For example:

Driver=Simba Concur ODBC Driver;Auth_Base_URL=https://us-impl.api.concursolutions.com;Host=https://implementation.concursolutions.com;UID=skroob;PWD=12345;Auth_Type=OAuth_2.0_Bearer;Auth_Client_ID=f145kn9Pcyq9pr4lvumdapfl4rive;Auth_Client_Secret=MIIEowIBAAKCAQEA18f3PhzSxNF8kSHGphg9WWR8iXj

Access tokens are valid for a limited amount of time only. If you provide a refresh token in addition to your Concur credentials, the connector can refresh the access token when it expires.

For example:

Driver=SimbaConcur ODBC Driver;Host=www.concursolutions.com;Auth_Base_URL=https://us-impl.api.concursolutions.com;Auth_Type=OAuth_2.0_Bearer;Auth_Client_ID=f145kn9Pcyq9pr4lvumdapfl4rive;UID=jsmith;PWD=simba123;Auth_RefreshToken=rP78cyQ7prE7LwUerMpFQ4Yt98w

Connecting to Concur Using Old Authentication with an OAuth 2.0 Token

The following is the format of a DSN-less connection string for connecting to Concur using your old authentication type with the OAuth 2.0 token. Based on your credentials, the connector retrieves an access token and then uses the retrieved access token to authenticate the connection.

Driver=Simba Concur ODBC Driver;Host=[InstanceURL];Auth_Type=OAuth_2.0;Auth_Client_ID=[YourClientID];UID=[YourUserName];PWD=[YourPassword]

For example:

Driver=Simba Concur ODBC Driver;Host=www.concursolutions.com;Auth_Type=OAuth_2.0;Auth_Client_ID=f145kn9Pcyq9pr4lvumdapfl4rive;UID=jsmith;PWD=simba123

Access tokens are valid for a limited amount of time only. If you provide a refresh token in addition to your Concur credentials, the connector can refresh the access token when it expires.

For example:

Driver=Simba Concur ODBC Driver;Host=www.concursolutions.com;Auth_Type=OAuth_2.0;Auth_Client_ID=f145kn9Pcyq9pr4lvumdapfl4rive;UID=jsmith;PWD=simba123;Auth_RefreshToken=rP78cyQ7prE7LwUerMpFQ4Yt98w

Connecting to Concur Using Windows Trust Store

The following is the format of a DSN-less connection string for connecting to the Concur server that requires SSL and uses the Windows trust store:

Driver=Simba Concur ODBC Driver;Host=[InstanceURL];Auth_Base_URL=[BaseURL];Auth_Type=OAuth_2.0_Bearer;Auth_AccessToken=[YourAccessToken];SystemTrustStore=1;

For example:

Driver=Simba Concur ODBC Driver;Host=www.concursolutions.com;Auth_Base_URL=us.api.concursolutions.com;Auth_Type=OAuth_2.0_Bearer;Auth_AccessToken=
kN9PcyQ9prK4LvUMMMpFL4R+lVE=;SystemTrustStore=1;

The following is the format of a DSN-less connection string for connecting to the Concur server that requires SSL and uses the path provided in the TrustCertsPath property:

Driver=Simba Concur ODBC Driver;Host=[InstanceURL];Auth_Base_URL=[BaseURL];Auth_Type=OAuth_2.0_Bearer;Auth_AccessToken=[YourAccessToken];SystemTrustStore=0;TrustCertsPath=[YourPath];

For example:

Driver=Simba Concur ODBC Driver;Host=www.concursolutions.com;Auth_Base_URL=us.api.concursolutions.com;Auth_Type=OAuth_2.0_Bearer;Auth_AccessToken=
kN9PcyQ9prK4LvUMMMpFL4R+lVE=;SystemTrustStore=0;TrustCertsPath=C:\Users\JSmith\Desktop\Cert\Concur.pem;