Hi @Vincent Lee
Thank you for posting your question in the Microsoft Q&A forum.
Please note that our forum is a public platform, and we will modify your code to hide your personal information in the description. Kindly ensure that you hide any personal or organizational information the next time you post an error or other details to protect personal data.
You have already completed the most important isolation step. The same production URLs and manifest work correctly when sideloaded, but the add‑in does not trigger OnMessageSend when installed from AppSource. This pattern almost always indicates Marketplace restrictions on event‑based activation rather than a caching or script issue.
After researching, I found the same behavior in this Github discussion Event based activation not working when add in obtained from App Source · Issue #5904 · OfficeDev/o…
The behavior is confirmed to be by design. Event-based activation such as OnMessageSend is only supported when the add-in is centrally deployed by a tenant administrator, not when installed by an end user from AppSource.
You can read more at Activate add-ins with events - Office Add-ins | Microsoft Learn.
To resolve this, the add‑in should be deployed by your customer or tenant administrator through the Microsoft 365 admin center. Go to Integrated apps, choose Upload custom apps, and deploy the add‑in to the organization. This ensures event‑based activation is supported and the add‑in works as expected.
I hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.