web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Salesforce Custom Conn...
Power Automate
Unanswered

Salesforce Custom Connector OAuth 2.0 Issue

(1) ShareShare
ReportReport
Posted on by 221

Hi all,

 

I am trying to create a custom connector for SFDC as I need to make some custom calls and am getting nowhere with this issue. I created a connected app that I can confirm is working when using Postman, but I just cannot get it to work in the Custom Connector. I get the following error:

 

 

 

Create and authorize OAuth connection failed. OAuth2 authorization flow failed for service 'Generic Oauth 2'. OAuth 2 sign in failed to exchange code for access token. Client ID and secret sent in form body.. Response status code=BadRequest. Response body: {"error":"invalid_grant","error_description":"authentication failure"} Client ID and secret sent in Basic authorization header.. Response status code=BadRequest. Response body: {"error":"invalid_grant","error_description":"authentication failure"}

 

 

 

 

My setup in PA looks like this:

 

Oauth.png

 

My SFDC settings look like this:

 

SFDC.png

 

I also tried this with Salesforce as the ID Provider, but get a "requested scope is not allowed" error instead. As you can see, the scopes in fact match. The only thing I can think of is that the OAuth 2.0 method in PA is actually using the flow: accessCode in the securityDefinitions and not implicit, but I actually cannot change that value. If I do and change it, it reverts straiht back. 

 

Long story short, I'm getting nowhere here and would appreciate any suggestions 🙂 

 

Cheers all,


Max

Categories:
I have the same question (1)
  • Verified answer
    Kikoger Profile Picture
    221 on at

    I literally searched for a solution for three days and then after posting this I find it immediately.... The login url was not correct.... Found the solution here: typescript - Salesforce - unsupported_grant_type: grant type not supported - Stack Overflow

  • RRK736 Profile Picture
    10 on at

    Please follow these steps and I have used APIM to achieve this. 

     

    https://powerusers.microsoft.com/t5/Power-Platform-Integrations/PowerApps-Custom-Connector-to-connect-to-Salesforce/td-p/1671680

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard