Microsoft Tech Community Live:  Microsoft Teams Edition
November 09, 2021, 08:00 AM - 12:00 PM (PST)

Problem with O365 add-in when opening MS-Office client using MS-Teams Open In Desktop App option

%3CLINGO-SUB%20id%3D%22lingo-sub-1996248%22%20slang%3D%22en-US%22%3EProblem%20with%20O365%20add-in%20when%20opening%20MS-Office%20client%20using%20MS-Teams%20Open%20In%20Desktop%20App%20option%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1996248%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EUsing%20the%20Office%20Add-in%20API%20Office.UI.displayDialogAsync()%20with%20%E2%80%9CdisplayInIframe%3Dfalse%E2%80%9D%2C%20the%20URL%20page%20was%20opened%20in%20a%20new%20tab%20on%20a%20default%20browser.%20However%2C%20the%20dialog%20couldn%E2%80%99t%20communicate%20back%20to%20the%20parent%20by%20calling%20Office.UI.messageParent()%20in%20desktop%20MS%20Teams.%20Is%20this%20expected%20behavior%3F%20Here%20is%20my%20setup%3A%20I%20have%20an%20add-in%20in%20desktop%20MS%20Teams%20Word%20that%20calls%20Office.UI.displayDialogAsync()%20to%20open%20a%20page%20in%20a%20dialog%20from%20a%20task%20pane.%20I%20can%E2%80%99t%20use%20displayInFrame%3D%20true%20to%20open%20the%20page%20in%20iframe%20due%20to%20security%20reason%20for%20the%20login%20page.%20Instead%2C%20I%20need%20to%20use%20displayInFrame%3Dfalse.%20The%20page%20gets%20to%20be%20opened%20in%20a%20new%20tab%20in%20a%20default%20browser%20such%20as%20Chrome.%20After%20that%2C%20calling%20Office.UI.messageParent()%20to%20try%20to%20communicate%20back%20to%20the%20Word%20task%20pane%20(parent%20window)%20returns%20no%20response.%20The%20task%20pane%20in%20MS%20Teams%20Word%20couldn%E2%80%99t%20receive%20the%20call.%20The%20same%20exact%20add-in%20works%20fine%20in%20the%20web%20version%20of%20MS%20Teams%20Word%20and%20desktop%20version%20of%20MS%20Word.%20I%20like%20to%20know%20if%20the%20API%20is%20supported%20in%20the%20desktop%20version%20of%20MS%20Teams%20Word%20environment.%20If%20it%E2%80%99s%20not%20supported%2C%20is%20there%20a%20work%20around%20for%20this%20issue%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1996248%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2008825%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20with%20O365%20add-in%20when%20opening%20MS-Office%20client%20using%20MS-Teams%20Open%20In%20Desktop%20App%20option%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2008825%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F904632%22%20target%3D%22_blank%22%3E%40praveenkumar_rajan%3C%2FA%3E%26nbsp%3B%3A%20Hi%20praveen%2C%20We%20are%20investigating%20this%20internally%20if%20this%20issue%20related%20to%20MS%20teams%20developer%20questions.%20I%20will%20update%20you%20soon.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Using the Office Add-in API Office.UI.displayDialogAsync() with “displayInIframe=false”, the URL page was opened in a new tab on a default browser. However, the dialog couldn’t communicate back to the parent by calling Office.UI.messageParent() in desktop MS Teams. Is this expected behavior? Here is my setup: I have an add-in in desktop MS Teams Word that calls Office.UI.displayDialogAsync() to open a page in a dialog from a task pane. I can’t use displayInFrame= true to open the page in iframe due to security reason for the login page. Instead, I need to use displayInFrame=false. The page gets to be opened in a new tab in a default browser such as Chrome. After that, calling Office.UI.messageParent() to try to communicate back to the Word task pane (parent window) returns no response. The task pane in MS Teams Word couldn’t receive the call. The same exact add-in works fine in the web version of MS Teams Word and desktop version of MS Word. I like to know if the API is supported in the desktop version of MS Teams Word environment. If it’s not supported, is there a work around for this issue?

2 Replies

@praveenkumar_rajan : Hi praveen, We are investigating this internally if this issue related to MS teams developer questions. I will update you soon.

@praveenkumar_rajan : Hi, I just received an update from engineering team that there is fix coming up soon and its under development. We don't have ETA to share. Thanks.

 

Thanks,

Manish Chitre

--------------------------------------------------------------------------------------------------------------------------------------------

If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.