I need outlook web add-in supported for Exchange 2013 accounts. So after adding manifest file for Outlook web app The add-in is loading nicely.
I am using Dialog API popup for Sign In functionality. So when customer is clicking on sign in button it shows Cannot read property 'displayDialogAsync' of undefined
while debugging I came to know that Office.context does not contain ui property.
Can anyone guide where I am going wrong ? Or Is this Dialog API supported for Outlook web app containing exchange accounts.
My add-in is working nicely for Outlook Desktop, Outlook Web and mobile as well
if (window.hasOwnProperty('Office')) {
Office.context.ui.displayDialogAsync(
`${window.location.origin}/#/signin/` + Office.context.mailbox.userProfile.emailAddress,
{
height: 60,
width: 20
},
(result) => {
const dialog = result.value;
dialog.addEventHandler(
Office.EventType.DialogMessageReceived,
(e: { type: string, message: string }) => {
if (e.message === 'true') {
this.oAuthService.initImplicitFlow();
}
dialog.close();
});
}
);
}