In only a few weeks, Salesforce is moving all Pardot users to single sign-on (SSO) and all API integrations must use Salesforce OAuth.
If you’re adjusting the Pardot plugin on your WordPress website to get ready for these changes and, despite following the steps in our first blog, are hitting authentication errors, this blog may help.
In this post, we’re going to cover how to resolve common errors that may come up as you authenticate the Pardot Plugin in WordPress and the final step to authenticate user account settings for SSO.
1. Callback URL Error
After entering the Consumer Key, Consumer Secret and Business Unit, it’s time to click the “Authenticate with Salesforce” button. When doing so, if the button pulls up the following error on a new white page window, you likely have a problem with your connected app’s callback URL.
error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration
In order to fix this error, edit your connected app’s callback URL to be the URL of the Pardot plugin’s settings page. For example, the callback URL should be something similar to the following URL.
https://yourdomain.com/wp-admin/options-general.php?page=pardot
2. Generic OAuth Error
If your previous errors change to the following OAuth Error, don’t fret, we have you covered. This error can be caused by the OAuth scopes field on your connected app.
Edit the app once more and add both the “Provide access to your data via the Web (web)” and “Perform requests on your behalf at any time (refresh_token, offline_access)” options in addition to your Pardot API option that should have been added from the first blog.
3. Authenticate your user account settings for SSO (without errors)
All that’s left to do now is to turn that ugly red text into beautiful green affirmation. Click “authenticate with salesforce” and use your Salesforce login credentials (with 2FA if enabled) to complete your SSO setup.
Get ready for the SSO user updates coming in February
Hopefully, by following the steps above, you feel more prepared for the API and single sign-on updates coming up soon. What are other questions you have about the coming changes? And what have you done to prepare? Let us know in the comments.
Please be aware that the current version of the plugin (1.5) contains a bug preventing the refresh token to be used to ask a new access token when the initial one expires.
I’ve already opened an issue on GitHub (https://github.com/pardot/pardot-for-wordpress/issues/46), another user managed to figure out the problem and I hope they’ll fix it ASAP because Spring ’21 release is around the corner 🙂
Great sleuthing, and I appreciate your sharing it here. I see there’s a recent addition and update on the Known Issues board for this. Glad this was caught – and fixed!
https://trailblazer.salesforce.com/issues_view?id=a1p4V000001JkAsQAK&title=pardot-wordpress-plugin-a-previously-successful-salesforce-sso-connection-gets-reverted-back-to-not-authenticated-status
I still need to check if the fix works.
I updated the plug-in to version 1.5.1 on several of our websites but I have to wait about 1 week to see if it doesn’t loses the connection.
Also noticed a new spike on API calls and need to check if it comes from the Pardot Connected Apps or something else.
Hello – I wanted to add that adding the additional Oauth scope “Provide access to your data via the Web (web)” did not work for us and SFDC support explained that wasn’t necessary. Not sure why, but that might help someone!
What worked for us was the workaround that Mark shared above: https://trailblazer.salesforce.com/issues_view?id=a1p4V000001JkAsQAK&title=pardot-wordpress-plugin-a-previously-successful-salesforce-sso-connection-gets-reverted-back-to-not-authenticated-status. This is also what SFDC support suggested we do.
A few minor details I came across:
– Make sure you copy the actual URL of your callback URL from WordPress. Ours was in the format https://www.yourdomain.com/wp-admin/options-general.php?page=pardot (the www needed to be inclued)
– Copying and pasting the consumer key, secret key, and business unit ID in a text edit doc instead of using the Copy button in SFDC.
– Logging out of WordPress, Pardot, and SFDC completely
– Opening an incognito browser, and resetting all settings, and clearing the cache in the Pardot plugin in WordPress before attempting to connect via SFDC SSO.