How to integrate ADManager Plus with Salesforce CRM
Steps to generate the Client ID and the Client Secret in Salesforce:
- Navigate to Home > Apps > App Manager > New Connected App
- Check the Enable OAuth Settings box for that connected app.

- Select the following scopes:
- Manage user data via APIs (api)
- Full access (full)
- Access unique user identifiers (openid)
- Access Lightning applications (lightning)
- Perform requests at any time (refresh_token, offline_access)
Note: You can select additional scopes if additional actions are required.
- Check the boxes next to Require Secret for Web Server Flow, Require Secret for Refresh Token Flow, and Enable Client Credentials Flow.

- Save your changes.
- Select an execution for the flow.
- From the connected app detail page, click Manage.
- Click Edit Policies.
- Under Client Credentials Flow, for Run As, find the user to which you want to assign the client credentials flow.
- The execution user must have the API Only permission.
- Save your changes
- After saving the connected app, click Manage Consumer Details to find the Consumer Key and Consumer Secret.


Steps to configure Salesforce CRM in ADManager Plus:
- Go to the Automation tab.
- Click HCM Integrations under Automation in the left pane.
- Under the HCM applications section, click the Custom HCM tile.
- In the Custom HCM Integration window that pops up, enter a suitable Name, Description and upload a Logo of Salesforce CRM and hit Save.
- Click the Salesforce CRM Integration tile added in the previous step to configure the API authorization methods, endpoints, and LDAP data mapping.
- Click Authorization.
- Select the Authorization Type as OAuth 2.0, fill in the following details and click Configure.
- Authentication Type: OAUTH (client credentials)
- Access Token URL: https://<your domain>/services/oauth2/token
- Scope: Full (depends on the use case)

- In the SalesForce CRM Endpoint Configuration section, click Add API Endpoint and configure the endpoints.
- API reference: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_query
- Sample endpoint: https://zhield-dev-ed.my.salesforce.com/services/data/v54.0/query?q=SELECT+FIELDS(ALL)+FROM+User+LIMIT+20
Note: zhield-dev-ed.my.salesforce.com is the host, which will change for every instance. The above link is the sample endpoint to fetch all the users from Salesforce.
9. Once done, click Test & Save.
Sample response:
New to ADSelfService Plus?