Office-Add-in-samples icon indicating copy to clipboard operation
Office-Add-in-samples copied to clipboard

Add-in Works Fine in Web Word Application but Shows Error in Windows Word Application

Open shivyash9 opened this issue 1 year ago • 5 comments

Issue: Add-in Error in Windows Word Application

I have created a Word Add-in using the yo office generator in React, with the backend served by multiple microservices in Ruby.

When I run all the microservices in HTTPS mode and start the UI with a valid certificate, the Word Add-in loads and works properly on the desktop version of Word on the web (https://www.office.com/launch/Word) for both Chrome and Edge.

However, when I try to open the same Add-in in the Windows Word application, I encounter the following error:

Add-In Error: The content is blocked because it isn't signed by a valid certificate.

Configuration:

  • Add-in built with React and backend in Ruby (multiple microservices).
  • HTTPS configuration with valid certificate.
  • All certificates are installed in the Windows Trusted Root Certification Authorities store, which ensures that they are trusted by the local system and all applications, including the Word desktop app.
  • Works fine in the web version of Word (Chrome, Edge).
  • Error occurs in the Windows Word application.

What I'm missing or what could be causing this issue?

Any help or suggestions would be greatly appreciated!


shivyash9 avatar Jan 14 '25 09:01 shivyash9

The first certificate if for UI of Word AddIn Rest 3 certificates are for 3 Ruby on Rails Backend microservices.

image

shivyash9 avatar Jan 14 '25 10:01 shivyash9

@emmasab Can you take a look at this? It seems to be more a runtimes issue than an auth issue.

Rick-Kirkham avatar Jan 17 '25 20:01 Rick-Kirkham

Hey Team, Feel free to let me know if any further detail is required to investigate this case.

shivyash9 avatar Jan 18 '25 08:01 shivyash9

Hi @shivyash9

Could you try the following steps:

  • Delete this folder in your user directly: office-addin-dev-certs
  • Run the command npx office-addin-dev-certs install
  • Ensure it works withnpx office-addin-dev-certs verify
  • If it doesn't work, try npx office-addin-dev-certs uninstall followed by npx office-addin-dev-certs install and verify the installation again

emmasab avatar Feb 03 '25 20:02 emmasab

Hey @emmasab,

I tried both approaches:

Trial 1:

  • Deleted the office-addin-dev-certs folder in my user directory.
  • Ran the command: npx office-addin-dev-certs install.
  • Verified it using: npx office-addin-dev-certs verify.

Trial 2:

  • Ran npx office-addin-dev-certs uninstall.
  • Reinstalled using npx office-addin-dev-certs install.
  • Verified again with npx office-addin-dev-certs verify.

In both cases, it still works with the MS Word website but gives the same error in the MS Word app. My hunch is that this might be due to the certificate issued for the UI being from Developer CA by Microsoft Office, while the certificate issued for all microservice backends is from localhost.

[Reference: Above attached image]

Image Image

shivyash9 avatar Feb 08 '25 13:02 shivyash9