Hi Neha,
It has to be done from SP side ( like the way you are calling logout+redirect_link ); I think you should consult with SP engineers how you can achieve.
I would move forward to configure such scenario with my local SP ( Shibboleth ) but ETA of such testing is not available due to community issue policy.
I'll test it if I can manage some time and inform you here in this ticket.