0

Could anyone please clarify my doubts. If I use Authentication Protocol as Oauth 2.0 and provide an Authentication Provider for the same with required settings and call a rest end point of different org

enter image description here

then how does the underlying mechanism differs from the below sample code?

enter image description here.

If we do not use named credentials and handle it in apex then we only require to hit token end point of salesforce and the grant_type needs to be specified as passwords. But if we use named credentials with Authentication Protocol as Oauth 2.0, then we need to specify authorization end point and token end. So does it mean if we use Authentication Protocol as Oauth 2.0 the grant_type implicitly becomes authorization_code

2
  • Yes, the grant type is the difference. As you correctly surmised, NC will only do authorization code out of the box.
    – identigral
    Commented Nov 26, 2021 at 15:35
  • Thank you @identigral for clarifying. Commented Nov 29, 2021 at 7:44

0

You must log in to answer this question.