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

Sort by: Updated
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 120 Reputation points
answered 2026-04-09T06:45:01.72+00:00
Dora-T 12,025 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,575 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 23,865 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,470 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,600 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,070 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,070 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,600 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

Howto bypass the "Import-only" restriction for Application permissions, or is a Service Account with Delegated permissions

I’m building a backend service to automate status updates in a Teams channel, but I’m hitting a consistent 403 Forbidden error when trying to POST a chatMessage. My app is registered in Entra ID with ChannelMessage.Send and Group.ReadWrite.All…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-03-05T13:58:15.72+00:00
Gilkey Nabil 85 Reputation points
accepted 2026-03-06T05:08:49.74+00:00
Gilkey Nabil 85 Reputation points
1 answer One of the answers was accepted by the question author.

How to get selected chart element in Excel JS API

We need to read the data point when a user clicks on one of the parts of a bar chart or pie chart. Something like getSelectedChartElement() that points to the underlying cell range where the data point resides? Or a Chart event whenever a chart element…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-03-05T15:19:50.2333333+00:00
Sharon Choong 40 Reputation points
accepted 2026-03-05T17:10:56.0233333+00:00
Sharon Choong 40 Reputation points
1 answer One of the answers was accepted by the question author.

Office.extensionLifeCycle.taskpane.setWidth() doesn't work on Web Word

Hello! I'm trying to use Office.extensionLifeCycle.taskpane.setWidth() to install initial width of my addin's taskpane like this: Office.onReady(() => { tr console.log(Office.context.requirements.isSetSupported('TaskPaneApi', '1.1')); …

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-02-23T09:58:52.6966667+00:00
Roman Tremb 20 Reputation points
accepted 2026-03-03T19:22:49.8966667+00:00
Roman Tremb 20 Reputation points
1 answer

Outlook Classic restricts Office.js network access

Hello, I am currently working on a Outlook add-in that applies the signature at the end of the body when the user starts composing an email or replies to another email. Currently I have two javascript files, one is the taskpane.js and the other is the…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-02-27T14:25:16.4066667+00:00
Aron Marinescu 0 Reputation points
commented 2026-03-02T10:45:45.7+00:00
Kudos-Ng 15,050 Reputation points Microsoft External Staff Moderator
2 answers

Webextensions folder not getting included in base64 format of currently opened document.

Hi Team, We are facing issue where as part of requirement we need to convert existing document to base64 that needs to be passed as parameter to our backend API. We are storing some metadata related to our usecase using Office settings API which is…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-02-27T06:15:38.2333333+00:00
Rajat Bharadwaj 5 Reputation points
commented 2026-03-02T06:28:38.61+00:00
Teddie-D 14,070 Reputation points Microsoft External Staff Moderator