0
votes

I have been wondering, is there a way to detect whether the addin is running in the deeplink version of the message compose or in the normal owa message compose via the "usual route" ?

Deeplink(https://outlook.office365.com/mail/deeplink/compose)

Usual route (https://outlook.office.com/mail/inbox ---> New Message)

What I tried:

1) window.location.href gives me the location of the js page in my webserver.

2) parent.document.location gives me "Uncaught DOMException: Blocked a frame with origin "https://localhost:3000" from accessing a cross-origin frame.".

I read that (for security reasons) an IFRAME can only read the origin of the pages in the IFRAME itself.

Can the office-js library natively detect which message compose link is being used?

1
There is no way / api to detect this currently. Can you please tell us what is your use-case? By detecting this, what exactly you are trying to achieve in your add-in? - Outlook Add-ins Team - MSFT
Thanks @OutlookAdd-insTeam-MSFT, in the end I managed to complete my task using API Calls. Originally I wanted to trigger an event (interacting with the email compose form) only from the outlook.office.com/mail/deeplink/compose scenario (while doing nothing from the normal way to access the mail compose). - Robert
the deeplink link changed from outlook.office365.com/mail/deeplink/compose to outlook.office.com/mail/deeplink/compose as of now (in my case). - Robert

1 Answers

0
votes

There is no way / api to detect this currently.

Thanks to @Outlook Add-ins Team - MSFT