@SyncTestUser1 Thanks for sharing your code. Your web apps should use IConfidentialClientApplication and not PublicClientApplicationOptions. Publicclientapplication is not intended to be used like that. Also, as your IIS runs under a differential credential set but cannot interact with the current login user session and being a remote process IIS is not capable of launching a browser as compared to IIS express your calls are stuck. Please let me know how it goes after the modification.
Also, it may be good idea to use aync/await pattern instead of wait() in your code.