1,152 questions with Microsoft 365 and Office | Development | Office JavaScript API tags

Sort by: Updated
2 answers

How to turn off - Tracking Prevention blocked access to storage for https://appsforoffice.microsoft.com/lib/beta/hosted/office.js.

The following message started appearing recently. Tracking Prevention blocked access to storage for https://appsforoffice.microsoft.com/lib/beta/hosted/office.js. This appears when I launch a word add-in . Is it possible that this is a side affect of a…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-04-15T08:39:44.6733333+00:00
Conway Magee 10 Reputation points
edited a comment 2026-04-16T14:45:45.1733333+00:00
Gabriel-N 15,810 Reputation points Microsoft External Staff Moderator
1 answer

Office.context.mailbox.item returns empty object when translateExchangeIds fails with 403c

We're experiencing an intermittent issue in our Outlook add-in, ExtendSync for Outlook by CloudExtend. We read the selected mail item via Office.context.mailbox.item, use convertToRestId() to get the REST ID, and call makeEwsRequestAsync() for additional…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-04-15T09:06:13.63+00:00
Aniket Tripathi 0 Reputation points
edited an answer 2026-04-16T14:14:47.7633333+00:00
Vergil-V 11,570 Reputation points Microsoft External Staff Moderator
2 answers One of the answers was accepted by the question author.

Why the add-in no longer has access to the sent item for further processing or modification

I have created Outlook add-in using Office.js and noticed that after the ItemSend event completes, the add-in no longer has access to the sent item for further processing or modification. This limits scenarios like post-send tagging, content updates, or…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-04-15T02:37:08.2+00:00
Mofaruf Essoua 20 Reputation points
accepted 2026-04-15T07:29:49.48+00:00
Mofaruf Essoua 20 Reputation points
1 answer

How do I migrate my add-in to use the Graph-based getCallbackTokenAsync to bypass these legacy EWS blocks while maintaining shared mailbox support?

"403 Forbidden" when my add-in attempts to call makeEwsRequestAsync on mailboxes tagged with the new 2026 "Restricted Access" policy. Even though the add-in manifest has ReadWriteMailbox permissions, the backend is rejecting the…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-04-13T02:02:43.73+00:00
Djeumala Leutner 40 Reputation points
commented 2026-04-14T04:38:14.14+00:00
Steven-N 24,365 Reputation points Microsoft External Staff Moderator
2 answers

Document.insertHtml failing with Error 5001 in 2026 Enterprise builds

my Word add-in tries to inject complex HTML fragments into a document containing legacy track changes and got Error 5001

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-04-10T00:17:18.4666667+00:00
Emeba Njenga 0 Reputation points
commented 2026-04-12T23:53:15.4333333+00:00
Steven-N 24,365 Reputation points Microsoft External Staff Moderator
2 answers

"Manifest validation failed" in M365 Admin Center

​I encounter the error "Manifest validation failed" in the M365 Admin Center while attempting to update our internal Outlook add-in. Even though the file passes office-addin-manifest validate with zero errors on my local machine, the…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-04-09T05:02:44.16+00:00
Zahmedli 140 Reputation points
commented 2026-04-09T23:23:00.9866667+00:00
Dora-T 12,425 Reputation points Microsoft External Staff Moderator
2 answers

getAccessToken failing for sideloaded Outlook Add-In, then working, then failing again

An Outlook Add-In that was working since at least November 2025 failed to load earlier this week. No changes have been made in the meantime to the code or Entra settings. It turns out that Office.auth.getAccessToken was throwing OSF.DDA.Error with …

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-04-03T14:04:20.3366667+00:00
Alexander Pavlov 0 Reputation points
commented 2026-04-08T21:24:44.7+00:00
Hin-V 13,760 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

Using a dynamic HTML script for my email signature

Hi I want to add a dynamic HTML script for my company's email signature on outlook. It needs to be enforced to all my employees in my M365 directory and it needs to be able to read their name, role, and email address to provide them as hyperlinks in the…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-04-06T09:43:52.2133333+00:00
jamie dimech 40 Reputation points
accepted 2026-04-08T10:22:27.4166667+00:00
jamie dimech 40 Reputation points
2 answers One of the answers was accepted by the question author.

Access Denied Error (3399614466) When Acquiring NAA Token in Outlook Add-in

Issue Description: We are imlementing sso in Outlook Add-in using Nested App Authentication (NAA) with MSAL.js (createNestablePublicClientApplication). When calling acquireTokenPopup(). I have taken all references from here…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-04-06T13:58:34.8666667+00:00
Nobilex 66 Reputation points
accepted 2026-04-07T07:04:22.07+00:00
Nobilex 66 Reputation points
2 answers One of the answers was accepted by the question author.

Word.ContentControl.insertFileFromBase64 does not replace Date Picker Content Controls in document headers.

Product: Office.js Word Add-in (Word on the Web / Word Desktop) API used: Word.ContentControl.insertFileFromBase64() / Word.Range.insertFileFromBase64()** Scenario:** I am building a Word Web Add-in that programmatically replaces document content…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-04-06T09:50:09.2066667+00:00
Samardeep Mahur 40 Reputation points
accepted 2026-04-06T10:47:36.4166667+00:00
Samardeep Mahur 40 Reputation points
2 answers

How can I optimize the Excel.run batching logic to ensure proxy objects are properly garbage collected between sync cycles?

Our Excel Add-in is consistently crashing during large data exports because context.sync() isn't releasing proxy objects fast enough, leading to massive memory leaks in the Office JS runtime. Even when I break the updates into smaller batches, the…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-04-05T06:28:38.1+00:00
Somsak Narong 20 Reputation points
commented 2026-04-06T01:52:08.87+00:00
Steven-N 24,365 Reputation points Microsoft External Staff Moderator
2 answers

MS Word Add-in : How to fetch the logged-in user details in typescrpit

Hi Team, We are developing new MS Word Add-in. We have requirement to fetch the current logged-in user details (mainly email) programmatically in typescript for further functional flow. I tried below Office.context.user.emailAddress …

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-03-30T10:18:35.1466667+00:00
Ajith Hegde 0 Reputation points
commented 2026-04-02T00:17:42.0966667+00:00
Austin-H 8,350 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

Office “Add-in Error” or remaining stuck on the loading screen.

An Office Add-in developed with Office.js loads correctly in the local environment, but after deployment it fails to initialize in Word/Excel, showing “Add-in Error” or remaining stuck on the loading screen. Browser developer tools indicate failures in…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-03-24T14:41:12.9233333+00:00
Neeraj Bhatia 80 Reputation points
accepted 2026-03-29T14:20:49.7633333+00:00
Neeraj Bhatia 80 Reputation points
2 answers One of the answers was accepted by the question author.

Office.js context for multiselected emails in Outlook

Hi, Could you please confirm that method getSelectedItemsAsync from Office.js (1.1) now supports New Outlook and Outlook in browser? I've noticed that emails objects in returned list contains email id that is really from each email itself which wasn't…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-03-25T11:28:21.05+00:00
Andjela Mijailovic 40 Reputation points
commented 2026-03-27T09:13:18.2433333+00:00
Michelle-N 14,795 Reputation points Microsoft External Staff Moderator
1 answer

Word on the web (SharePoint/WOPI): ContentControl.cannotEdit — ribbon formatting persists after save/reopen; not reproducible on Word desktop

We are seeing this behavior only in Word on the web when editing documents opened from SharePoint (WOPI). We do not see the same issue when opening the same document in Word for Windows / Mac (desktop). We use the Word JavaScript API with rich text…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-03-26T12:26:28.7066667+00:00
Huzefa Khan 0 Reputation points
commented 2026-03-27T08:25:03.88+00:00
Gabriel-N 15,810 Reputation points Microsoft External Staff Moderator
2 answers One of the answers was accepted by the question author.

NoBootJs Error - Outlook Web App Fails to Load JavaScript on Laptop Only

Problem Description: I am experiencing a critical issue accessing Outlook.com on my laptop that has persisted for multiple days. The same account works perfectly on my mobile phone, confirming this is device-specific. Error Details: Error Code:…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-03-20T09:17:43.2366667+00:00
Walid Mensi 40 Reputation points
accepted 2026-03-22T13:13:34.3+00:00
Walid Mensi 40 Reputation points
2 answers

Can i open sharepoint site docx file url using word js api from word desktop/web addin ?

We have requirement to open a uploaded word document present in MS SharePoint site from word addin (desktop and web). Expectation is if document is present in MS SharePoint , open a link to docx file so user can collaborate simultaneously with other…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-03-10T05:32:57.9666667+00:00
Rajat Bharadwaj 5 Reputation points
commented 2026-03-18T02:23:50.03+00:00
Teddie-D 14,685 Reputation points Microsoft External Staff Moderator
2 answers

Popup Login flow not working since microsoft blocked windows opener unexpectedly

We are facing issues with https://login.windows.net/common/OAuth2/authorize?resource=https://manage.office.com since the resource is giving response header as cross-origin-opener-policy : same-origin; report-to="coop-endpoint"due to which…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-02-27T09:00:10.9633333+00:00
Collection Team 5 Reputation points
commented 2026-03-13T05:27:17.6366667+00:00
Teddie-D 14,685 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

How to create a toggle button in the ribbon in the Excel JS API

It definitely seems possible to create a toggle button in VBA (see…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-03-11T19:38:05.1+00:00
Sharon Choong 40 Reputation points
accepted 2026-03-12T01:37:57.7466667+00:00
Sharon Choong 40 Reputation points
2 answers One of the answers was accepted by the question author.

Multiselection in Outlook web add-in in Outlook Web/New Outlook with Unified manifest

Hello, We migrated our solution from a COM add-in to an Outlook Web Add-in (Office.js). As part of this transition, we also encouraged our clients to move to the new Outlook. Our add-in uses the Unified Manifest model. We are now trying to implement…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-03-06T14:07:20.0433333+00:00
Andjela Mijailovic 40 Reputation points
edited a comment 2026-03-06T15:32:24.9366667+00:00
Gabriel-N 15,810 Reputation points Microsoft External Staff Moderator