Please follow the instructions below to make the login page redirect to the SAML IDP.
Find the IDP identifier
1. Open CompleteFTP Manager
2. Select the Users panel
3. Click on Configure... in the Single sign-on/SAML row
4. Press Ctrl+C
5. Open a text editor, such as Notepad
6. Paste the clipboard into the editor.
It should look something like this:
Name ID User attribute User prefix User matching
OneLogin https://my.idp.com/url Unchecked
The IDP identifier is the URL in the middle of line 2, i.e. https://my.idp.com/url, which we’ll use below.
Create the login redirection script
1. Open a text editor, such as Notepad
2. Paste the following into the text editor:
if (request.uriParts.path.toLowerCase().indexOf("/login/") === 0 && system.user.isAnonymous
) {
const idpIdentifier = "https://my.idp.com/url";
const uri = request.uriParts;
response.redirectUrl = `${uri.protocol}://${uri.host}/Saml/Authenticate?idp=${idpIdentifier}`;
}
3. Substitute your IDP identifier into line 2 in place of https://my.idp.com/url
4. Save the file to the following path: C:\ProgramData\Enterprise Distributed Technologies\Complete FTP\Include\Custom\customizations.jss
Test it
Open your browser and navigate to the usual login page. You should find that it now does exactly what it would do if the user had loaded the login page and clicked the IDP’s button.