function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rhythm SharmaRhythm Sharma 

How to GET Access token from ADP and integrate to Salesforce?

Hello Everyone, I am integrating ADP into Salesforce but for this, I have to get an access token from ADP, I tried but not getting an access token. so if anyone has worked on this please let me know.

#salesforce
Best Answer chosen by Rhythm Sharma
SwethaSwetha (Salesforce Developers) 
I've looked up for this error and found a similar scenario from past: https://stackoverflow.com/questions/39062327/how-to-get-access-token-from-adp-api-using-rest

"It looks like you will need to resolve the issue of ADP issued client certificate first. https://developers.adp.com/articles/general/introduction-mutual-ssl (Mutual TLS/SSL Help from ADP Dev Site). You will need to contact your ADP support team if they have not issued you a client API (SSL) cert yet"


If this information helps, please mark the answer as best. Thank you

All Answers

SwethaSwetha (Salesforce Developers) 
HI,

Once you register your Salesforce application with ADP, Client ID and Client Secret generated for your application.Then you will need to Set up OAuth 2.0 in Salesforce.

To Implement the OAuth 2.0 Authorization Flow:
- In your Salesforce code, you'll need to handle the OAuth 2.0 authorization flow to obtain the access token from ADP.
- Use the ADP Authorization URL, along with the necessary parameters, to redirect the user to ADP for authentication.
- Once the user authenticates with ADP, ADP will redirect back to the Callback URL you specified in your Connected App.
- Implement the callback endpoint in Salesforce to receive the authorization code sent by ADP.
- Exchange the authorization code for an access token by making a request to the ADP token endpoint using the Client ID, Client Secret, authorization code, and other required parameters.
- Once you have obtained the access token from ADP, store it securely in Salesforce.
-  Use the access token to make authenticated API requests to ADP on behalf of the user.

Related: https://developers.adp.com/articles/guides/auth-process-data-connector-apps?chapter=2

https://developers.adp.com/articles/general/access-tokens

https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oidc_initial_access_token.htm&type=5

If this information helps, please mark the answer as best. Thank you
Rhythm SharmaRhythm Sharma

Hey Swetha,

I Have client id and client secret but when i am using this to get access token i am getting this below error - proper client ssl certificate was not presented

 

Have you ever integrate ADP with salesforce ?

SwethaSwetha (Salesforce Developers) 
I've looked up for this error and found a similar scenario from past: https://stackoverflow.com/questions/39062327/how-to-get-access-token-from-adp-api-using-rest

"It looks like you will need to resolve the issue of ADP issued client certificate first. https://developers.adp.com/articles/general/introduction-mutual-ssl (Mutual TLS/SSL Help from ADP Dev Site). You will need to contact your ADP support team if they have not issued you a client API (SSL) cert yet"


If this information helps, please mark the answer as best. Thank you
This was selected as the best answer
Rhythm SharmaRhythm Sharma
Thank you for your help.
Rhythm SharmaRhythm Sharma
Hey Swetha, I just want to ask one thing to you if you have any idea regarding ADP