How to create a Content Hub OAuth client and service user for Medialake, add them to Medialake as an access key, and understand exactly what the connection can reach.
What to expect
Sitecore Content Hub appears in Medialake as the Content Hub integration. It is connected with an OAuth client that you create in your own Content Hub instance, together with the username and password of a dedicated Content Hub user. There is no Content Hub sign-in or consent screen during setup: nobody is redirected to Content Hub to log in. Instead, Medialake uses Content Hub's OAuth 2.0 resource owner password credentials grant: it sends the client ID and client secret, together with the user's username and password, to your instance's /oauth/token endpoint and receives an access token, all server-side.
Because Medialake signs in as that user, the user's permissions define exactly what Medialake can see. We follow the principle of least privilege: the recommended setup uses a dedicated service user that can only read and download the assets you want to sync, and never a personal or administrator account. The Content Hub connector only reads content — it searches assets, reads their properties, retrieves thumbnails, and downloads the files it syncs. It does not create, edit, or delete anything in Content Hub.
Content Hub admin Medialake Content Hub
│ create service user │ │
│ and OAuth client │ │
│──────────────────────────────────────────────────▶│
│ │ │
Medialake administrator
│ save access key │ │
│────────────────────────▶│ │
│ │ client ID + secret, │
│ │ username + password │
│ │────────────────────────▶│
│ │ access token │
│ │◀────────────────────────│
│ │ │
Team member
│ connect, choose │ │
│ what to sync │ │
│────────────────────────▶│ │
│ │ read-only requests │
│ │────────────────────────▶│
Before you begin
You will need:
Access in Content Hub that lets you create users and OAuth clients, usually a Content Hub administrator account
Your Content Hub host name, for example
yourcompany.sitecorecontenthub.cloudAdministrator privileges in Medialake, to save the access key
>Keep the credentials private. This connection uses a password as well as a client secret. Store both in an approved password manager or secret-management system. Do not email them, paste them into a support ticket, or commit them to source control. Medialake stores the values you enter encrypted and never shows them again.
Step 1: Create a dedicated Content Hub user
Medialake signs in as this user, so the user — not the OAuth client — defines what Medialake can access.
In Content Hub, create a dedicated user for the integration, for example
medialake_readonly.Give the user a password it can sign in with. Medialake signs in with the username and password directly, so the account must be able to sign in to Content Hub with a password.
Add the user to a user group whose policy grants Read, DownloadOriginal, and DownloadPreview on the M.Asset definition, limited to the assets Medialake should sync. Do not give it permission to create, edit, or delete content, or to administer Content Hub.
Sitecore's documentation describes using a dedicated service user account for this purpose, so that operations performed by a service are not linked to an individual's account.
Step 2: Create an OAuth client in Content Hub
On the Content Hub menu bar, click Manage (the cog icon).
On the Manage page, click OAuth clients.
On the OAuth clients page, click + OAuth Client.
In the OAuth client dialog, fill in:
- Name: a recognizable name, such as Medialake.
- Client ID and Client Secret: the values Medialake will use. Avoid spaces in both.
- Redirect Url: the password grant does not use it. If Content Hub asks for a value, enter any https:// address, such as the address you use to sign in to Medialake.
- Users: this field applies only to Content Hub's client credentials grant, which Medialake does not use. You do not need to set it.
Click Save, and record the Client ID and Client Secret.
Sitecore recommends a separate OAuth client for each external application, so that you can revoke one application's access without affecting the others.
Step 3: Add the credentials to Medialake
You need administrator privileges in Medialake for this step.
In Medialake, open Administration → Integrations from the sidebar.
Open the Content Hub integration.
In the Access Keys section, click Create New Setting.
In the New access key panel, enter a Name for the key, for example
Marketing Content Hub app. The name is shown in the access key list and next to every account that connects with it.Under Credentials, fill in each field:
| Field | What to enter |
| --- | --- |
| Enter your Content Hub Client ID here without any space | The Client ID from Step 2. |
| Enter your Content Hub Client Secret here without any space | The Client Secret from Step 2. |
| Enter your Content Hub Username | The username of the dedicated user from Step 1. |
| Enter your Content Hub Password | That user's password. |
| Content Hub Domain | Your Content Hub host name only, for example yourcompany.sitecorecontenthub.cloud. Do not enter https://, a trailing slash, or a path. |
Under Who can use it?, choose the teams that can connect Content Hub with this key, or make it available to all teams.
Click Save access key.
Medialake adds https:// to the host name itself, so a value that already includes it will not work.
Connect Content Hub and choose what to sync
With the access key saved, any team member who is allowed to connect sources, on a team that can use the key, can add Content Hub:
Open Connections → Catalogue from the side menu.
Find Content Hub and click Connect.
Under Access key, select the key saved in Step 3.
Optionally click Test to check the credentials with Content Hub before connecting.
Click Connect.
There is no Content Hub login screen. Medialake requests an access token from https://yourcompany.sitecorecontenthub.cloud/oauth/token with the password grant, then calls Content Hub's REST API on the same host.
By default, Medialake offers one selection, All Assets, which covers every asset the dedicated user can see. It can be selected, but not opened. Nothing is synced until you select it. Medialake skips assets whose file type it does not support.
After the first full sync, later syncs ask Content Hub only for assets that changed since the previous sync, with a full pass from time to time to pick up anything a changes-only sync missed. A new Content Hub source syncs automatically once a week by default; you can change this to daily or monthly.
Limiting what Medialake can access
Content Hub enforces what the connection can reach through the dedicated user's permissions. Medialake can only access what that user can access, so restricting the user's group memberships is the strongest control.
The selection you choose in Medialake controls what is synced, but it does not narrow the credentials themselves. For the narrowest possible connection, give the dedicated user access only to the assets that need syncing, and review its permissions periodically.
What Medialake can and cannot do
With the configuration above, Medialake can:
Request access tokens with the OAuth client's ID and secret and the dedicated user's username and password
Read the asset definition, to confirm the connection works
Search the assets the dedicated user can see
Read asset properties such as file name, extension, size, content type, dimensions, and created and modified dates
Retrieve thumbnails
Download the content of the assets it syncs, using Content Hub's renditions: an MP4 rendition for video, an MP3 rendition for audio, and the original file for other assets
Medialake does not:
Access assets the dedicated user cannot access
Create, upload, edit, or delete assets
Change collections, taxonomies, or metadata
Manage Content Hub users, user groups, OAuth clients, or settings
Staying connected
Content Hub access tokens are valid for one hour. When Content Hub rejects an expired token, Medialake signs in again with the stored client ID, client secret, username, and password, and retries the request. No user action is needed.
The connection stops working, and the source is marked unauthorized in Medialake, if Content Hub refuses that sign-in. That happens when the user's password is changed or expires, the user is deactivated, or the OAuth client is deleted or its secret changed. If your organization requires periodic password changes, plan to update the access key each time the dedicated user's password changes. To restore a connection, save a new access key with the current credentials and switch the source to that key. To switch, open the source's General tab, click Change Key in its Access Keys section, select the new key, and click Save.
If Content Hub returns a temporary error or asks Medialake to slow down, Medialake waits and retries automatically.
Revoking access
To revoke Medialake's access from Content Hub:
Delete the OAuth client created for Medialake from Manage → OAuth clients.
Alternatively, deactivate the dedicated user or change its password.
In Medialake, an administrator can also delete the access key from the Content Hub integration's Access Keys section. Remove the Content Hub source in Medialake as well if it should no longer sync.
Troubleshooting
Symptom | What to check |
"A setting with this title already exists in the group. Choose a different title." | Another Content Hub access key already uses that name. Choose a different Name. |
Test reports "The provider rejected these credentials." | Content Hub refused the sign-in. Check that the client ID and secret match the OAuth client, that the username and password are correct, and that the user is active and its password has not expired. Re-enter each value without leading or trailing spaces. |
Test reports "These credentials look right, but the provider couldn't confirm them just now." | Check that Content Hub Domain is the host name only, with no |
"No integration settings available for this service." when connecting | No Content Hub access key is available to your team. Ask a Medialake administrator to save one, or to add your team under Who can use it? |
The source becomes unauthorized | The dedicated user's password changed or expired, the user was deactivated, or the OAuth client was deleted or its secret changed. Save a new access key with the current credentials and switch the source to it. |
An expected asset is missing | The dedicated user cannot see it, or its file type is not supported. Changes made since the last sync appear after the next one. |
An asset appears but its file will not download | Confirm the dedicated user can download that asset's original file or renditions in Content Hub. |
If the issue continues, contact [email protected] with your Content Hub host name, the access key's name, and the error message. Do not include the client secret or password.
Further reading
Create an OAuth client — Sitecore's guide to the OAuth clients page
OAuth tokens — supported grant types, the token endpoint, and token lifetimes
Questions about connecting Sitecore Content Hub? Contact [email protected].
