Creating and renewing OAuth user credentials automatically
Administrators can unlock OAuth user credentials when a user first logs in to Analytics Content Hub.
With unlocked credentials, a dialog box appears during the login process. When it finds a valid user session for the OAuth provider, Analytics Content Hub automatically uses those credentials. If the system can't locate a valid session, the user needs to log in again. The feature is disabled by default.
Procedure
- Log in to the Analytics Content Hub server as an administrator.
- Go to the Windows Services interface and stop the AnalyticsContentHub-node1 service.
- Open the File Explorer and navigate to the <install_directory>\AnalyticsContentHub\app\node1\tomcat\webapps\theia directory.
- Open the config.json file in a text editor.
- Locate the
"connectors":{}
entry. - Depending on the OAuth connector that you configure the settings for, copy the correct code
snippet and paste it as the
connectors
value.OAuth connector Code snippet SharePoint online "sharePoint": { "warmupCooldown": { "attemptWarmup": true, "oauthAutoCreateCredential":true } }
PowerBI online "powerBI": { "warmupCooldown": { "attemptWarmup": true, "oauthAutoCreateCredential":true } }
Both SharePoint online and PowerBI online "powerBI": { "warmupCooldown": { "attemptWarmup": true, "oauthAutoCreateCredential":true } }, "sharePoint": { "warmupCooldown": { "attemptWarmup": true, "oauthAutoCreateCredential":true } }
Note: With these settings, the Analytics Content Hub can automatically create credentials for new users and refresh them every 24 hours. You can remove the daily check by following steps in the Modifying daily credentials refresh section. - Save the config.json file.
- Start the DigitalHive-node1 service.
Modifying daily credentials refresh
To remove the credentials refresh or change the time period, follow these steps:
- Log in to the Analytics Content Hub as an administrator.
- Go to the Windows Services interface and stop the DigitalHive-node1 service.
- Open the File Explorer and navigate to the <digital_hive_install>\app\nod1e1\tomcat\webapps\theia directory.
- Open the config.json file in a text editor.
- Locate the
"attemptWarmup": true
entry and add the following code snippet below it:"delayBetweenWarmup": 1728000000,
Note: ThedelayBetweenWarmup
property takes a number value that represents the time it takes to refresh the credentials in milliseconds. The maximum value is 1728000000, which equals to a 20-day refresh cycle. - Save the condig.json file.
- Start the DigitalHive-node1 service.
Troubleshooting
- An existing user deletes their OAuth credential and the credential is not re-created on the next log in
-
When a user deletes their existing OAuth credential or cancels the dialog window, the system does not re-create credentials on subsequent logins. This behavior is intended and the user needs to log in manually.
- Authentication dialog window does not appear or the browser displays a Please Wait message
-
This error occurs because the browser does not allow pop-ups. Go to the browser settings or click the icon in the search bar to enable pop-ups and redirects from the login page.
- Problem with connector detected
-
When you open Analytics Content Hub, there is an error message in the Overview tab. The message states that it detected a problem with the connector. You need to re-authenticate the system credential by following these steps:
- Go to the connector details page.
- Click the Settings icon.
- Click the Re-authenticate button.
- Prompt for re-authentication appears earlier than the refresh cycle
-
There are two possible causes that can trigger this issue:
- Analytics Content Hub uses your credential as system credential for the connector.
- You logged in to Analytics Content Hub as a different user since logging in with your own account.
In both scenarios, you must sign out of all browser sessions and re-authenticate with the correct system credential.