Hey raghu prab,
Can you provide more details about your use case and what exactly do you expect from IdP when sending AJAX request ?
I understand that makes more sense a 401 than a redirect when request is an AJAX call. But is that all ?