How to Expose Salesforce Data Cloud Data to CRM-Only Users Without Direct Access
A common Salesforce architecture challenge arises when a Lightning component needs to display Data Cloud data for CRM-only users who lack direct Data Cloud access. Using ConnectApi.CdpQuery fails in this scenario because queries run as the current user, causing access denials for those without Data Cloud permissions. The solution involves a dedicated integration identity that handles all Data Cloud queries on behalf of CRM users, using Named Credentials, External Credentials, and an External Client App. Two permission gates control access: a Custom Permission that determines whether a user can invoke the feature, and an External Credential Principal grant that allows the Apex transaction to use the stored integration credentials. This architecture ensures CRM users can view Data Cloud data through a shared Lightning component without ever directly authenticating to Data Cloud.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in