In Microsoft Q&A forum with Exchange server tags, we mainly discuss and provide suggestions to solve problems lie in server side. Based on your description, your issue is more related to Exchange development. To better resolve it, it’s suggested to post your issue in Exchange Server > Exchange Server Development forum. You will get more professional information there.
Thanks for your understandings!