Hello @Ligesh Koshy ,
Thanks for your post and apologies for the delayed response.
If you have already configured federation between PingFederate and Azure AD as detailed [here][1] then you can leverage these code samples to protect Web application and Web API using Azure AD. Hope this helps.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.
[1]: PingFederate integration with Azure Active Directory and Microsoft 365.