Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Salesforce oauth2 errors when setting up data connection

I'm having trouble making a connection with PowerApps and Flow to salesforce, which worked at some point in the past. I am able to succesfully query salesforce from PowerBI and use that regularly.  

I've tried authenticating into both the production server with my email address, and also in the sandbox when connected to VPN. The sandbox prompts for domain credentials for SSO, and production I use my salesforce email and password. 

I succesfully authenticate with both methods, and click "allow access". However, before establishing a connection it returns "something went wrong, please try again later" with the production server, and "oauth2 authorization flow failed for service 'salesforce'. Oauth2 sign in failed to exchange code for client access token. 


Does anybody see anything obvious that I can try? thank you 



Level: Powered On

Re: Salesforce oauth2 errors when setting up data connection


I'm having the same issue while trying to connect to salesforce from Flow.

Have you found any solutions yet?

Level: Power Up

Re: Salesforce oauth2 errors when setting up data connection

This was never resolved after months of trying to figure this out. It was specific to the salesforce instance - the last instruction from Microsoft support was to disable the attached setting in salesforce, but I didn't have the admin rights  on salesforce and left the company prior to getting the ticket resolved. 


In salesforce, disable: "Lock session to the domain in which they were first used"



Helpful resources


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 310 members 6,453 guests
Please welcome our newest community members: