Forum Discussion
SalesForce scheduled synch setup returns error
This 400 Bad Request credential validation failure happens because while Power BI Desktop uses an interactive, short-lived session cookie to pull your Salesforce data, the Power BI Service requires a continuous backend OAuth2 token exchange to authenticate unattended scheduled refreshes, which can fail due to three common platform restrictions. First, if your company is running Salesforce Professional Edition, API access is completely disabled by default; while the desktop client can awkwardly bypass this limitation during a manual import, the cloud service engine will always throw an invalid credentials error unless your Salesforce administrator explicitly purchases the API Access add-on or upgrades your organization to Enterprise or Unlimited. Second, if your organization does have API access enabled, your Salesforce administrator likely has a Connected App or Security Profile policy active called "Force relogin after Login-AS-User" or an OAuth refresh token policy set to "immediately expire," both of which immediately invalidate the automated cloud handshake; your admin must adjust these token expiration behaviors under Salesforce Security Controls to let external cloud resources maintain an active link. Finally, if those settings are clear, the error could simply be a corrupted token cache matching your login.salesforce.com string, which you can resolve by clearing your global permissions in Power BI Desktop, changing your Salesforce Data Source Privacy Levels to Organizational, republishing the .pbix file, and immediately clicking Edit Credentials on the Service to re-authenticate using the formal OAuth2 interactive pop-up window.