Creating the Data Source Name
This section describes how to edit the DSN configuration and then authenticate and connect to Confluence APIs.
DSN Configuration
You can use the Microsoft ODBC Data Source Administrator to edit the DSN configuration. Note that the installation process creates a both a user DSN and a system DSN, as described in Installing the Connector.
Note: The connector stores connection information in the Windows registry. To ensure that the connector can write to the registry, either run Power BI as an administrator or use a User DSN for your connection instead of a System DSN.
User DSN
Complete the following steps to edit the DSN configuration:
- Select Start > Search, and enter ODBC Data Sources in the Search box.
- Choose the version of the ODBC Administrator that corresponds to the bitness of your Power BI Desktop installation (32-bit or 64-bit).
- Select the system data source and click Configure.
- Edit the information on the Connection tab and click OK.
System DSN
Configure the system DSN the same way as the user DSN, except you will need to switch to the System DSN tab before performing Step 3.
If you're using Power BI's On-Premises Data Gateway with Standard mode, you must use the system DSN.
You must also specify a valid location for OAuthSettingsLocation (a path where OAuth credentials are locally stored to avoid repeated OAuth prompts).
This is because the Standard mode runs on service mode and can only access permitted locations, such as C:\Windows\ServiceProfiles\PBIEgwService\AppData\Local\Microsoft\On-premises data gateway.
Connecting to Confluence
You can establish a connection to any Confluence Cloud account or Confluence Data Center (on-premises) instance. To connect, you must set the URL connection property. For Confluence Cloud, the URL follows the format https://yoursitename.atlassian.net. For Confluence Data Center, set URL to the address of your self-hosted instance; for example, https://confluence.yourcompany.com.
Authenticating to Confluence
Confluence Cloud supports the following authentication methods: API token, OAuth, and single sign-on (SSO) via Crowd or Okta.Confluence Data Center supports the following authentication methods: Basic authentication, OAuth (custom OAuth application required), Personal Access Token (PAT) authentication (Confluence 7.9 or later), and SSO via Crowd or Okta.
API Token
Acquire a TokenAn API token is necessary for account authentication. To generate one, log in to your Atlassian account and select API tokens > Create API token. The generated token is displayed.
Authenticate Using the Token
To authenticate to a Cloud account, provide the following connection properties (Note: Password has been deprecated for connecting to a Cloud account and is now used only to connect to a Data Center instance.):
- AuthScheme: APIToken.
- User: The user to be used to authenticate with the Confluence server.
- APIToken: The API token associated with the currently authenticated user.
- URL: The URL associated with your Confluence endpoint. For example, https://yoursitename.atlassian.net.
Basic Authentication
To authenticate to a Data Center instance, specify the following properties:- AuthScheme: Basic.
- User: The user to authenticate with the Confluence instance.
- Password: The password which is used to authenticate with the Confluence server.
- URL: The URL associated with your Confluence endpoint. For example, https://confluence.yourcompany.com.
Note: Starting in Confluence Data Center v10.0, Basic authentication is disabled by default. Consider using Personal Access Token (PAT) or OAuth authentication instead.
OAuth
In all cases, you must set AuthScheme to OAuth and Scope to the value obtained from your application settings. In all the flows described below, it is assumed that you have done so. Note: OAuth 1.0 is deprecated in Confluence Cloud and should only be used by hosted Confluence users.Desktop Applications
For Confluence Cloud, CData provides an embedded OAuth application that simplifies authentication at the desktop. You can also authenticate from the desktop via a custom OAuth application. See Creating a Custom OAuth Application for more information.Get an OAuth Access Token
After setting the following, you are ready to connect:
- OAuthVersion: 2.0.
- URL: The URL to your Confluence endpoint; for example, https://yoursitename.atlassian.net.
- OAuthClientId: The client Id in your application settings.
- OAuthClientSecret: The client secret in your application settings.
- CallbackURL: The redirect URL in your application settings.
Headless Machines
To configure the connector to use OAuth with a user account on a headless machine, you must authenticate on another device that has an internet browser.- Choose one of two options:
- Option 1: Obtain the OAuthVerifier value as described in "Obtain and Exchange a Verifier Code" below.
- Option 2: Install the connector on a machine with a browser and transfer the OAuth authentication values after you authenticate through the usual browser-based flow, as described in "Transfer OAuth Settings" below.
- Then configure the connector to automatically refresh the access token on the headless machine.
Option 1: Obtain and Exchange a Verifier Code
To obtain a verifier code, you must authenticate at the OAuth authorization URL.
Follow the steps below to authenticate from the machine with an internet browser and obtain the OAuthVerifier connection property.
- Create the Authorization URL by setting the following properties:
- InitiateOAuth: OFF.
- OAuthClientId (custom applications only): The client Id assigned when you registered your application.
- OAuthClientSecret (custom applications only): The client secret assigned when you registered your application.
- OAuthVersion: 2.0.
- Call the GetOAuthAuthorizationURL stored procedure with the CallbackURL input parameter set to the exact redirect URI you specified in your application. For Cloud instances, this is found under Authorization > OAuth 2.0 (3LO). For Data Center instances, this is found under General Configuration > Administration > Application Links > Your application > Edit.
- Open the returned URL in a browser. Log in and grant permissions to the connector. You are then redirected to the callback URL, which contains the verifier code.
- Save the value of the verifier code. You need to set this in the OAuthVerifier connection property.
Next, you must exchange the OAuth verifier code for OAuth refresh and access tokens. Set the following properties:
On the headless machine, set the following connection properties to obtain the OAuth authentication values.
- InitiateOAuth: REFRESH.
- OAuthVerifier: The verifier code.
- OAuthClientId (custom applications only): The client Id in your custom OAuth application settings.
- OAuthClientSecret (custom applications only): The client secret in the custom OAuth application settings.
- OAuthSettingsLocation: Set this to persist the encrypted OAuth authentication values to the specified location.
- InitiateOAuth: REFRESH.
After the OAuth settings file is generated, you must re-set the following properties to connect:
- InitiateOAuth: REFRESH.
- OAuthClientId (custom applications only): The client Id assigned when you registered your application.
- OAuthClientSecret (custom applications only): The client secret assigned when you registered your application.
- OAuthSettingsLocation: The location containing the encrypted OAuth authentication values. Make sure this location gives read and write permissions to the connector to enable the automatic refreshing of the access token.
- OAuthVersion: 2.0.
- URL: The URL to your Confluence endpoint. For Cloud instances, for example, https://yoursitename.atlassian.net. For Data Center instances, for example, https://confluence.yourcompany.com.
Option 2: Transfer OAuth Settings
Prior to connecting on a headless machine, you must install and create a connection with the connector on a device that supports an internet browser. Set the connection properties as described in "Desktop Applications" above.
After completing the instructions in "Desktop Applications", the resulting authentication values are encrypted and written to the location specified by OAuthSettingsLocation. The default filename is OAuthSettings.txt.
After you have successfully tested the connection, copy the OAuth settings file to your headless machine.
On the headless machine, set the following connection properties to connect to data:
- InitiateOAuth: REFRESH.
- OAuthClientId (custom applications only): The client Id assigned when you registered your application.
- OAuthClientSecret (custom applications only): The client secret assigned when you registered your application.
- OAuthSettingsLocation: The location of your OAuth settings file. Make sure this location gives read and write permissions to the connector to enable the automatic refreshing of the access token.
- CallbackURL (custom applications only): The callback URL in your application. For Cloud instances, navigate to Authorization > OAuth 2.0 (3LO). For Data Center instances, navigate to General Configuration > Administration > Application Links > Your application > Edit.
- InitiateOAuth: REFRESH.
- OAuthSettingsLocation: The location of your OAuth settings file. Make sure this location gives read and write permissions to the connector to enable the automatic refreshing of the access token.
- OAuthVersion: 2.0.
- URL: The URL to your Confluence endpoint. For Cloud instances, for example, https://yoursitename.atlassian.net. For Data Center instances, for example, https://confluence.yourcompany.com.
PAT Authentication
PATs are supported for Data Center instances running Confluence 7.9 or later.Acquire a Token
To generate a PAT, log in to your Atlassian account and select your profile picture at the top right of the screen, then select Profile > Personal Access Tokens > Create token.
Authenticate Using the Token
To authenticate using PAT, specify the following properties:
- AuthScheme: PAT.
- User: The user to authenticate with the Confluence instance.
- PAT: The PAT associated with the authenticated user.
- URL: The URL associated with your Confluence endpoint. For example, https://confluence.yourcompany.com.
Crowd
To authenticate via Crowd SSO:
- AuthScheme: Crowd
- User: The Crowd user account.
- Password: The password associated with the Crowd account.<
- SSOLoginURL: The login URL associated with the Crowd account. You can find the IDP URL by navigating to your application > SSO > SSO information > Identity provider single sign-on URL.
- SSOAppName: The name of the application in which SSO is enabled.
- SSOAppPassword: The password of the application in which SSO is enabled.
- SSOExchangeURL: The URL used used to exchange the SAML token for Confluence cookies. This URL may have the following formats:
- https://<authority of Confluence instance>/plugins/servlet/samlconsumer
- https://<authority of Confluence instance>/plugins/servlet/samlsso
Example connection string:
AuthScheme=Crowd;Url=https://yoursitename.atlassian.net;SSOLoginURL='https://<authority>/crowd/console/secure/saml/sso.action';User=crowdUserName;Password=crowdPassword;SSOExchangeUrl=https://<authority of Confluence instance>/plugins/servlet/samlconsumer;SSOAppName=CrowdAppName;SSOAppPassword=CrowdAppPassword;
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 used to exchange the SAML token for Confluence cookies. This URL may have the following formats:
- https://<authority of Confluence instance>/plugins/servlet/samlconsumer
- https://<authority of Confluence instance>/plugins/servlet/samlsso
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 connector 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 connector 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;Url=https://yoursitename.atlassian.net;SSOLoginURL='https://example.okta.com/home/appType/0bg4ivz6cJRZgCz5d6/46';User=oktaUserName;Password=oktaPassword;SSOExchangeUrl=https://<authority of Confluence instance>/plugins/servlet/samlconsumer;