Hi,
We have integrated AEM with salesforce, we are able to pull data from Salesforce from the dispatcher URL. Sometime we are getting below exception after reconnecting to salesforce from cloud config we are not seeing below error.
Exception:
com.adobe.cq.mcm.salesforce.SalesforceException: Repository Exception in Searching SFDC Leads javax.jcr.AccessDeniedException: OakAccess0000: Access denied
at com.adobe.cq.mcm.salesforce.SalesforceLeadSearch.search(SalesforceLeadSearch.java:87)
Code:
String configPath = cloudConfig.getPath();
Resource configResource = resolver.getResource(configPath);
Node configNode = ((Node)configResource.adaptTo(Node.class)).getNode("jcr:content");
configNode.setProperty("accesstoken", client.getAccessToken());
configNode.getSession().save();
Thanks,
Kishore