1

I am trying to deploy a Microsoft Word Office Add-in through Office 365 using centralized deployment. I created my project using the yeoman generator and VS code. After testing and running on my local machine I built to project using npm run build (this created the dist folder). I then deployed this on a web server. I then took the url to this folder, confirmed that it worked, and updated my xml file. I then deployed the xml through central deployment on office 365. I then opened word and was able to download the add-in through insert -> my add-ins -> manage add-ins in word. However when I click on the add-in to load the taskpane it gives the error enter image description here

My question is what can be causing this error. I have confirmed that I can access the files that I am hosting on my web server, and I double checked that I updated my xml file properly. I have been following this documentation from Microsoft: https://learn.microsoft.com/en-us/office/dev/add-ins/publish/publish-add-in-vs-code

nsharma98
  • 223
  • 2
  • 14
  • Hi there, can you centrally deploy any add-ins from the store? Does the issue only happen while centrally deployed and not sideloading? If you're having issues, I'd also try clearing the Office cache -- https://learn.microsoft.com/en-us/office/dev/add-ins/testing/clear-cache. Also can you clarify what you mean for "Microsoft Word Office add-in through Office 365".. Is that Word for web, or Windows or Mac? Thanks! – Keyur Patel - MSFT Mar 22 '20 at 18:26
  • @KeyurPatel-MSFT I am able to centrally deploy add-ins for the store. It only happens when centrally deploying, the add-in works when sideloading. Clearing the cache did not solve the issue. By "Microsoft Word Office add-in through Office 365" I meant to say an Add-in for Windows/Mac/Web using the Office.js taskpane. Thank you for the response. – nsharma98 Mar 22 '20 at 22:24
  • Is web server available to public access or only within your network? Did you test your changed manifest file by sideloading it in office online? – Developer Mar 23 '20 at 08:23
  • The web server is public and yes the changed manifest does work when sideloaded. – nsharma98 Mar 23 '20 at 09:23

1 Answers1

0

I moved my web app to Azure instead of using my local web server, and that solved the issue.

nsharma98
  • 223
  • 2
  • 14
  • I am also having the same issue, I host the addin on JS server through npm start, it works when I sideload the addin from the same machine. I updated the manifest and add remote url where the addin is hosted, it doesn't work. I know one way is to publish to azure web app service, but is it free? I believe they give you a trial for 12 months. – Anonymous May 13 '20 at 01:42
  • I have been hosting mine on Azure as a static website and my bill for last month was 0$. Here is a link to get you started if you choose that route: https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website – nsharma98 May 13 '20 at 05:42
  • Thank you. After hosting to Azure do we need to add azure server url in the remote url tag in manifest? Then one just need to share manifest with people who need to use it and they would be able to sideload it. Is that correct? – Anonymous May 20 '20 at 14:14
  • Yes that is correct, just add it to the manifest and distribute the XML. Here are the instructions to sideload on windows: https://learn.microsoft.com/en-us/office/dev/add-ins/testing/create-a-network-shared-folder-catalog-for-task-pane-and-content-add-ins. There are also some instructions for how to do it on OSX as well. – nsharma98 May 20 '20 at 21:12
  • Thanks alot. Can you share some pointers towards how to host add in to azure. I haven't used azure before, this would be the first time and don't want to get charged as well. – Anonymous May 20 '20 at 23:30
  • I also tried hosting it on linux, but office-addin-debugging isn't supported on linux. And now I am stuck as I have already configured my linux server for python and java services. – Anonymous May 21 '20 at 00:35
  • This link will get you set up in azure: https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website It is pretty simple to follow. Hope it helps. – nsharma98 May 21 '20 at 00:46
  • I already tried this but it doesn't sideload the addin in excel. Do I also need to start node server? – Anonymous May 21 '20 at 00:51
  • did you update your manifest.xml with the link for the static website – nsharma98 May 21 '20 at 00:54
  • Yes. I pasted the url in this tag But it didn't seem to work. I also gave the public access. – Anonymous May 21 '20 at 01:00
  • There are 7 or 8 places in the manifest where you need to replace it, make sure you replaced it everywher. – nsharma98 May 21 '20 at 01:01
  • When I load the url in address bar, my taskpane.html page appeared. It means that url is was working fine but it wasn't loading it in manifest.xml as sideload. – Anonymous May 21 '20 at 01:01
  • Okay. Thanks. Will do. Highly appreciate your help. – Anonymous May 21 '20 at 01:02
  • One last thing, do I need to upload all files to storage? – Anonymous May 21 '20 at 01:06
  • you just have to upload the contents of the folder that is generated after the npm run build command – nsharma98 May 21 '20 at 01:13
  • I run "npm start" in local host and upload the manifest.xml (updated with urls replaced with azure urls) it works. But when I stop locally started node server addin stops working. – Anonymous May 21 '20 at 01:19
  • npm start is used for running it locally. You are just trying to deploy it to Office 365. Take the manifest.xml with the updated link and deploy it. – nsharma98 May 21 '20 at 01:35
  • I validated the manifest.xml with updated link it works, works as in it's validated, but when I run "npm start manifest.xml" it says Error: Unable to start debugging. Error: The current platform is not supported: win32 is there a different command to deploy manifest.xml? – Anonymous May 21 '20 at 01:48
  • to deploy the add-in you have to go through the admin center: https://learn.microsoft.com/en-us/office/dev/add-ins/publish/centralized-deployment – nsharma98 May 21 '20 at 02:07
  • Ah! Got it. So it means you can only share your manifest within your organization, right? You can't simply share manifest with someone and they wouldn't be able to sideload in their online excel tool. – Anonymous May 21 '20 at 12:49
  • There is a way to share it with individuals as well. I sent these in an earlier comment: https://learn.microsoft.com/en-us/office/dev/add-ins/testing/sideload-office-add-ins-for-testing – nsharma98 May 21 '20 at 19:13
  • Unfortunately it didn't work through admin centre as well. Addin gets shared but I still need to run local host server. I think I am doing something wrong in the deployment process. – Anonymous May 21 '20 at 19:43
  • When I load addin through admin managed it get's loaded only if my localhost server is running. If I stop localhost node server it get's disconnected. I am confused, I didn't give any url to localhost, all the urls are pointing to static website, but it still needs local server. – Anonymous May 21 '20 at 20:13
  • I deployed the addin without using azure and admin portal. Thank you for your suggestions and help. – Anonymous May 22 '20 at 04:26