Welcome to the Microsoft Q&A forum, and thank you for reaching out to us.
Please correct me if I’m mistaken, but it sounds like your app’s deep link works fine when triggered from Teams web chat, but fails with an "Invalid deep link format" error when invoked from a message extension. You’re wondering whether this issue is caused by iframe sandboxing or SDK initialization timing in the Teams web client.
To assist you better, could you please share your JSON configuration file? Kindly remove any personal or sensitive information before posting.
Also, have you tested this scenario in the Teams desktop client? If so, does the same error occur there?
Looking forward to your response.
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.