function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rene HernandezRene Hernandez 

Pass username and password from Salesforce to an external URL

Hi everyone, need your help.

We have a custom Visualforce page that contains a URL link to another web application.  The external web application has a login screen we would like to bypass by passing username and password information from Salesforce.

Has anyone been able to successfully do this?   
Santosh Kumar Sriram_2310Santosh Kumar Sriram_2310
Hi Rene,

Try using a HTTP request to the URL and pass the Authorization header. Use the "named credentials" feature of salesforce and associate the authorization header on the callout. The endpoint should be the landing URL once logged in.

Hope this helps!

Note: If you think this is the right/best answer kindly set this as the best option. Also if this helps you find the solution, do like (click on thumbs up) icon!
Durgapaavan kDurgapaavan k
Hi Santosh,

I have the same requirement to bypass the Login screen of the external system,
Could you post me the sample code for the "named credentials" feature.

Thanks in Advance,

Regards,
Durgapaavan k,
k.durgapaavan@gmail.com