Enabling Liferay’s REST Connector to SharePoint
Requires DXP Subscription; Compatible with SharePoint 2016 and SharePoint Online Liferay 2026.Q1+
Liferay’s REST Connector to SharePoint integrates Documents and Media with SharePoint libraries. Create repositories to mount SharePoint libraries, manage documents and folders, check in and check out files, download content, and more. Changes in one system propagate to the other.
Prerequisites
To connect SharePoint to Liferay, you must first have an application registered in an external identity provider (e.g., Microsoft Entra ID) that meets these requirements:
- Redirect URI: The registration must include a valid Redirect URI pointing to your Liferay instance. For local development, this is typically
http://localhost:8080/c/document_library/sharepoint/oauth2. - API Permissions: The application must be granted Delegated Permissions (e.g.,
AllSites.Manage) to allow Liferay to perform file operations on behalf of the user. - Credential Retrieval: You must obtain the Client ID, Client Secret, and Tenant ID from the provider’s dashboard.
Adding a SharePoint OAuth 2 Configuration
Liferay uses an OAuth 2 configuration entry to define the authentication bridge between the portal and SharePoint.
-
Open the Global Menu (
), go to the Control Panel tab, and click System Settings.
-
Navigate to Documents and Media → SharePoint OAuth 2.
-
Click Add (
) to create a new configuration entry. -
Complete the configuration using the values from your application registration.
Field Description Name A user-friendly name for the connection Client ID The unique Application ID provided by the identity provider Client Secret The secret key generated for the application registration Scope The permission scope URL (e.g., https://[your-tenant].sharepoint.com/.default)Tenant ID The unique Directory ID of the identity provider tenant -
Click Save.
-
With the OAuth2 configuration defined, you can mount specific SharePoint libraries as repositories within your Liferay Site or Asset Library.
-
After creating a repository, click the Open OAuth link provided in the success message to activate the connection. Once authorized via the external provider, the repository content is accessible within the Documents and Media UI.