Thank you for your post and I apologize for the delayed response!
From your issue, I understand that you'd like to know if the Azure MFA NPS Extension can be installed onto any server, for example a web server (Tomcat, Weblogic) since you'd like to invoke this extension from your application's code.
From my understanding, after reading through the NPS with Azure AD MFA documentation that you shared - it looks like installing the NPS Extension onto a web server might not be possible
, since your web server will need additional libraries, Windows Server 2012 or above, met networking requirement, and more. For more info - NPS extension Prerequisites.
Update:
I reached out to our Azure AD MFA team so they can look into your issue, and the recommendation would be to install the extension on a dedicated server. It isn't recommended to install the NPS extension on a web server due to potential capacity, performance, or networking configuration issues. However, if your web server doesn't run into these problems, having the NPS extension on your web server may work.
If you have any other questions, please let me know. Thank you for your time and patience throughout this issue.
If the information helped address your question, please Accept the answer. This will help us and also improve searchability for others in the community who might be researching similar information.