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

Sort by: Updated
2 answers

Sensitivity label file update office add-in

Hello, We are trying to allow the user to update a sensitivity label of a file through an office add-in. We noticed - even if our app registration has the right permissions - as long as any user has the file open, we get an error response that the file…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-01-15T07:05:29.4633333+00:00
Andreas Davros 71 Reputation points
commented 2026-01-16T11:58:29.3933333+00:00
Michelle-N 11,215 Reputation points Microsoft External Staff Moderator
2 answers

doc.undo() works in Desktop version of Word but fails in the Online version

Problem Statement : There is a Word document which is being modified by multiple people, not simultaenously though(basically supports co-authoring). This includes all redlines, all comments, content controls, customXMLMappings etc. The requirement is to…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-01-08T14:31:07.0366667+00:00
RahulK 0 Reputation points
commented 2026-01-16T08:20:12.84+00:00
RahulK 0 Reputation points
1 answer

Need help with java code

// MOLF - Fill ONLY (1 AR at a time). No Submit clicks. // Paste 1 Excel row (TAB-separated, NO header): // FirstName | MiddleName | LastName | Role | JobTitle | Email | PhoneType | PhoneNumber | Country (function () { // Expose globally so bookmarklet…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-01-12T18:03:05.7633333+00:00
Lakshmi Polisetti 20 Reputation points
commented 2026-01-14T15:06:39.71+00:00
Flora-T 9,205 Reputation points Microsoft External Staff Moderator
3 answers One of the answers was accepted by the question author.

How to get the content of a comment that has been clicked on ?

Hello, I am currently working on a Microsoft Add-In by using the Office js API and I need to retrieve the content of comments from a word document. I have been able to find how to retrieve the content of the comment when clicking on the text attached to…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2025-11-24T10:11:05.99+00:00
Ariel NORA 20 Reputation points
answered 2026-01-13T13:24:06.36+00:00
Challapall, Madhu Babu 0 Reputation points
2 answers One of the answers was accepted by the question author.

Outlook add in after email send event

Hello, I'm developing an Outlook add in, specifically targeting new Outlook. One of my requirements is to trigger a UI workflow after an email is sent that will save the email to a third party system. I've attempted to do this with the OnSend event,…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-01-12T03:40:58.2166667+00:00
Stephen 20 Reputation points
commented 2026-01-13T08:11:49.58+00:00
Teddie-D 10,720 Reputation points Microsoft External Staff Moderator
1 answer

Excel Add-in: Is There a Truly Unique Workbook Instance ID (Not Copied on Save As)?

We have an Excel addin written in JavaScript and have found a limitation that we'd like to know if it's truly a limitation or is not clearly understanding the Excel API. We want to store some information in a database that we can reference via an id we…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-01-12T15:31:14.1833333+00:00
Aldo Sanchez 0 Reputation points
answered 2026-01-13T02:25:58.15+00:00
Dora-T 9,150 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

Office API: how should API access be centrally managed and governed to ensure security

Im operating multiple internal applications and services consume Office APIs (Microsoft Graph and workload-specific APIs) across SharePoint, Teams, Exchange, and OneDrive. These APIs are accessed by different solutions using both delegated and…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-01-12T12:03:55.9033333+00:00
Alexander Thomas 20 Reputation points
commented 2026-01-12T13:41:38.3733333+00:00
TiNo-T 10,285 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

I'm integrating Office Apps in my product using Graph API and encountering the following error

I'm integrating Office Apps in my product using Graph API and encountering the following error: { "code":"AuthenticationError", "message":"Error authenticating with resource", "innerError": { How can…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-01-12T03:28:45.9866667+00:00
Mcelhenney Liza 40 Reputation points
accepted 2026-01-12T06:58:49.3366667+00:00
Mcelhenney Liza 40 Reputation points
2 answers

Possibility for opening the onedrive inside the outlook desktop using Officejs from outlook addin

i am developing an outlook addin using yeoman and reactjs. i am loading my addin in a popup window instead of sidetaskpane. i am using officejs for opening the popup window and also opening new mail using displaydialogasync function which i get from…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-01-08T15:00:37.1366667+00:00
Development One 0 Reputation points
commented 2026-01-12T03:43:43.84+00:00
Flora-T 9,205 Reputation points Microsoft External Staff Moderator
1 answer

How to remove debug pop up on add in load

Hello all, Currently developing a JavaScript add-in for Microsoft word and are looking to start running live tests with users. To facilitate this I wish to remove the following pop-up that appears when the add in button is pressed. (Clicking…

Microsoft 365 and Office | Development | Office JavaScript API
Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Microsoft 365 and Office | Word | For business | Windows
asked 2023-03-24T09:39:49.4133333+00:00
Keith McClung 10 Reputation points
commented 2026-01-08T10:28:52.72+00:00
Martin Parkur 5 Reputation points
1 answer

Web Excel Unable to import base64 but working with Excel Desktop

Only issue with Web excel in import using office.js but working with Excel Desktop const workbook = context.workbook; const base64 ="" workbook.insertWorksheetsFromBase64(base64, { positionType: Excel.WorksheetPositionType.end, });…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-01-07T05:57:38.5566667+00:00
Aakash Gautam 0 Reputation points
commented 2026-01-07T12:52:40.2066667+00:00
Michelle-N 11,215 Reputation points Microsoft External Staff Moderator
2 answers

How to make my Outlook addin visible on Mac

manifest-prod - New version.Monkata.xml Hi, Please advice how to make outlook addin visible on Mac. Manifest is uploaded. Thanks.

Microsoft 365 and Office | Development | Office JavaScript API
asked 2025-12-22T14:13:56.68+00:00
Kostadin Kostadinov 0 Reputation points
edited the question 2025-12-30T15:09:23.5733333+00:00
Ana M 0 Reputation points Moderator
2 answers

Table of Contents not auto-generated or updated in Word Online (Word for the Web)

Hi Team, I am programmatically generating Word (.docx) documents using JavaScript (docx library). The document contains: Proper Heading styles (Heading 1, Heading 2) A valid Table of Contents field When I open the document in Microsoft Word Desktop,…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2025-12-28T10:37:10.3866667+00:00
Nishi Sharma 0 Reputation points
answered 2025-12-28T14:30:37.03+00:00
Carlo Luna 6,765 Reputation points Independent Advisor
2 answers

Does the "online" word document support removing/adding content control along with text? If YES, what Office.js API can be used?

Hi Team, My requirement in Word document using Office.js APIs in both desktop version and web version are- remove the text with its content control add the text with content control I could perform both actions above in 'Desktop version' without any…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2025-12-18T08:35:30.38+00:00
Ajith Hegde 0 Reputation points
commented 2025-12-24T14:27:38.6233333+00:00
Flora-T 9,205 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

Published Outlook Add-in - only OnMessageSend not triggering

I have published this add-in for more than a year, previously I've only tested with the old Outlook on Windows and it works perfectly. Now I've changed some of the JS scripts (but not my manifest.xml) to make some features work with the new Outlook on…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2025-12-19T02:16:03.3166667+00:00
Vincent Lee 20 Reputation points
edited the question 2025-12-23T09:59:33.33+00:00
Jack-Bu 5,745 Reputation points Microsoft External Staff Moderator
1 answer

Is it possible to Compare two base64 document using Word JS API? I don't want to compare with currently opened document. Requirement is to compare two different word document.

Is there a way to invoke Word.Document.Compare or compareFromBase64 method from Word Javascript API to compare two Word documents in base64 format? I don't want to compare with currently opened document. Requirement is to compare two different word…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2025-12-19T07:27:18.1133333+00:00
Rajat Bharadwaj 0 Reputation points
commented 2025-12-22T10:55:36.1366667+00:00
Gabriel-N 11,405 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

login.microsoftonline.com/common/oauth2/v2.0/logout?post_logout_redirect_uri does not use the provided redirect URI

im using Microsoft OAuth2 to authorize users and obtain access and refresh tokens, in some cases I need the user to logout form the application, I used the redirect URI in the authorization process and it worked fine, and after the user successfully sign…

Microsoft 365 and Office | Development | Office JavaScript API
Microsoft Security | Microsoft Authenticator
Microsoft Security | Microsoft Graph
asked 2023-06-19T13:41:45.08+00:00
Abdalla Dimes 20 Reputation points
answered 2025-12-20T09:39:02.3733333+00:00
Chetan Belhekar 0 Reputation points
2 answers

How to set the vertical scroll percentage on the active document

I'm working on a Word add-in using the preview version of the Office API and I'm trying to programmatically scroll the page, which seems to be possible based on the docs. I'm trying to do something like this: await Word.run(async (context) => { …

Microsoft 365 and Office | Development | Office JavaScript API
asked 2025-12-15T16:29:47.4033333+00:00
G6574567 0 Reputation points
edited a comment 2025-12-19T04:14:28.2366667+00:00
Kha-N 6,640 Reputation points Microsoft External Staff Moderator
1 answer

insertFileFromBase64: "The action is not supported by word in a browser."

In word online the following Office js API is throwing error "The action is not supported by word in a browser." The same code works fine in the word desktop. Could you please let me know if there is any alternative to this API which will work…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2025-12-11T08:00:32.44+00:00
Rahul Kumar 0 Reputation points
commented 2025-12-15T08:46:04.9066667+00:00
Michelle-N 11,215 Reputation points Microsoft External Staff Moderator
3 answers One of the answers was accepted by the question author.

535 5.7.139 Authentication unsuccessful

We are receiving the following error using the Office 365 SMTP server to send mails: 535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Same issue with MFA (+ App password) and without…

Microsoft 365 and Office | Development | Office JavaScript API
Exchange | Exchange Server | Management
Exchange | Exchange Server | Management
The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.
8,088 questions
asked 2021-08-13T11:12:53.717+00:00
Maurice Wegner 51 Reputation points
commented 2025-12-09T13:19:13.8766667+00:00
Anderson Ipiales 0 Reputation points