-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Office.context.mailbox.item.internetMessageId is empty #4425
Comments
I feel like something may be missing from these repro steps. (especially if it repros across all platforms) Can you try Script Lab (installable through the App Store) to make sure it works? Is there anything special about the email or the account that you are testing with? I was able to get it working in Classic Windows Outlook. (are you on "old" outlook or "new" outlook?)
|
Thank you. AFAIK, the Outlook versions are all "new." The macOS was installed a few weeks ago, the Windows version just last week. (I'm not concerned with "old" Outlook. That supports our old add-ins which have been in use for years.) Since running the modified add-in demo, my Outlook inbox received another email (sent from out corporate mail server using Mozilla's Thunderbird on macOS Sonoma 14.4.1). The modified add in shows the Message-ID for that email, but on no others--two from GMail in a browser, one from microsoft-noreply@microsoft.som (about upcoming subscription renewal), nor one I sent this morning from macOS Mail v16.0 (3774.500.171.1.1) through our corporate mail server. Your ScriptLab sample works for all emails with macOS Outlook. I've tried to test it in with Outlook for web, but today the add-in will not load despite repeated attempts to clear cache, reload, restart the dev server, etc. Since the modified add-in demo works in one email but not others, I still believe there is a problem with office.js. As for Outlook for web, my attempts using it with demos fail more often than work. I can't believe that it's truly ready for production. (At best, I find it nearly useless for development and testing.) |
I'm going to forward this issue to the Mac and OWA group. For Script Lab not working in OWA please see this: |
@johnthad We could not repro the issue in mac outlook and owa. In case scriptlab is not working, could you try executing this -console.log(Office.context.mailbox.item.internetMessageId) in console after switching to your add-in frame and check if you see internetMessageId for all types of mails you mentioned |
@timwan10 - Thanks for the tip about disabling Third Party Storage Partitioning. ScriptLabs now loads for me in Chrome (BTW, it's a nice tool). Would disabling Third Party Storage Partitioning be a user requirement for other add-ins, should we ever write one? (Someone might consider a note about this in the docs. It's far more helpful than references to IE11.) @mmanjaree-msft - The console trick works. Thanks. As for my code demo, below is my
|
@johnthad Just to confirm. With api call in console, you are able to get internetMessageId but with this sample addin you see a blank. |
The DevTools console in Chrome is simple awash with red when I run Outlook in the browser. I've attached a log for a session and do not find the word "undefined" in a text search. In this session I open Outlook in chrome and run the add-in against several emails in the Inbox. Only one email shows its outlook.office.com-1716213574272.log A video matching the creation of this log is at https://www.dropbox.com/scl/fi/1tntcza5tfadwyuc2n2v4/Screen-Recording-2024-05-20-at-09.57.51.mov?rlkey=p993obmebji7dsp6qe5cu0lw8&st=jmhjz783&dl=0 |
Thank you for bringing this to our attention. Based on the information you've provided; it appears that the issue may not be related to the platform as it works fine when called from Dev-Tools console. |
I have reviewed the add-in's code. Presumably, Microsoft has also reviewed the add-in's code since it's Microsoft's example. As stated when opening this issue, the example is the Build your first Outlook add-in using the Yeoman generator, and changing one word. It appears there are circumstances where |
@johnthad The issue here seems related to the format of the internetMessageId which is enclosed in <>. The value is being assumed as a HTML tag and hence, not being displayed in taskpane. Could you please try updating the js code as below and see if the id populates correctly. |
No change. The I removed the HTML markup from around the word "Subject:", changing line #21 from
to
I launch macOS Outlook and reset the account. I can see that "Subject:" is no longer in bold face but the |
@johnthad You just need to change "innerHTML" to "innerText" and keep the remaining code as it is. Could you please try that? |
Success! That works. My apologies for missing the change to |
The internetMessageId field of an email message is empty on all platforms tested. This can be demonstrated with one minor modification to the Build your first Outlook add-in demo.
Your Environment
Expected behavior
After clicking Run,
Subject:
should display followed by an internetMessageId, ex.Subject: <a8bc2e87-248f-455a-b5c9-db8026d788cc@az.eastus.microsoft.com>
Current behavior
Only
Subject:
displays.Steps to reproduce
src/taskpane/taskpane.js
, line 22, changeitem.subject
toitem.internetMessageId
and save the file.npm start
and load the add-in in Outlook via themanifest.xml
Context
Without the internetMessageId I do not know how an add-in can reliably tell a server side MS Graph app (written in Java) which message it should open for key indexing data and attachments (for a document management system).
The text was updated successfully, but these errors were encountered: