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
Clint D' SilvaClint D' Silva 

How to create button on visual force custom login page that will send a sp-initiated SAML request to external IDP

When a community is set up with access to multiple IDP with SSO. The standard login page will disply buttons for each of the allowed IDP's and the user can make a choice on who to autenticate with.

How to get this functionality working on a custom button in visual force as a SP-initiated request. I am able to get a button working as a idp-initiated request .

With the standard page i have found the following it  makes a call to the salesforce SAML request generator '/saml/authn-request.jsp' with  parameters picked from SSO setup.  This in turn generates a SAML assertion make a call to the idp sending through the  saml request and relay state as a POST message.

I have not found anything that salesforce provides that can do this for custom visualforce. ie: a function that can pick values from SSO setup and make a call to the SAML generator. Something that can be invoked into the button click event for the button  . Is there something or is there any other way 
Best Answer chosen by Clint D' Silva
Clint D' SilvaClint D' Silva
A workaround to get this working is to have a button initiate a  IDP-initiated request with Relay State.  

All Answers

Clint D' SilvaClint D' Silva
A workaround to get this working is to have a button initiate a  IDP-initiated request with Relay State.  
This was selected as the best answer
nbknbk
Hi,
I am looking for similar functionality, Can you please provide steps that how you control the IDP list from login page? any sample code, really helpful
he standard login page will disply buttons for each of the allowed IDP's and the user can make a choice on who to autenticate with.?

Thanks
Krishna