How to redirect to SimpleSAML for SSO?

I have SimpleSAML running properly with CakePHP 1.3 i.e. the on clicking the sign in link it redirects to the federated login page setup with SimpleSAML but using the same code (with required changes) with CakePHP 3.5 it doesn’t work. I have not changed anything with the SimpleSAML config or metadata.

I can provide any code or config required. Is there something you guys could suggest?