OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
690 stars 95 forks source link

sideloading and organization policy #4865

Open duane-j-wagner opened 2 months ago

duane-j-wagner commented 2 months ago

My add-in works great when using Visual Studio Code and npm run start:desktop script, but when I try to sideload with a shared folder (for QA) the add-in shows under the shared folder tab, but adding it does nothing except show the message in the status bar: 'Add-ins loaded successfully'. My organization is blocking the Office Store. If this affects sideloading as well, it should be documented. Also Excel should tell users that shared folders are blocked as well. If there is a separate way that orgs can block shared folders, then let me know and I'll ask my admin to relax that restriction.

AlexJerabek commented 2 months ago

Hi @duane-j-wagner,

Thanks for reporting this. If your add-in is loading, but not showing, I'm inclined to think this is a product bug. I'm going to transfer this issue to the office-js repo, where such bugs are tracked and triaged.

shanshanzheng-dev commented 2 months ago

Hi @duane-j-wagner could you share us the manifest that we can repro your issue? Thanks.

duane-j-wagner commented 2 months ago

Here is my manifest with localhost, but the file for QA has localhost replaced with a confidential internal host name. manifest-local.xml.txt

I was directed to this page my my admins. Near the bottom is this note:

Note
Preventing users from accessing the office store will also prevent
them from Sideloading Office Add-ins for testing from a network share.
shanshanzheng-dev commented 2 months ago

Hi @duane-j-wagner Thanks, the store disable doesn't affect the sideload things. you can try to follow this reference about how to sideload with shared folder https://learn.microsoft.com/en-us/office/dev/add-ins/testing/create-a-network-shared-folder-catalog-for-task-pane-and-content-add-ins

duane-j-wagner commented 2 months ago

I did follow that reference to network share side load, but it results in this issue as stated at the first comment above. As stated in my previous comment, there is a note on the Office 365 admin documentation that clearly states that the store disable does in fact prevent network share side loading. There is no error. It just doesn't work. It also does not work when I use Excel online in Office 365 and upload my add-in. Again, no error. It just does not work.

shanshanzheng-dev commented 2 months ago

Hi @duane-j-wagner Thanks for the information, could you check your config on Excel win32/online? win32: click Home -> Account image image online: image

Hi @Rick-Kirkham @m-hellesen @XuanZhouMSFT @adrianwu8516 are you have any insights to help our customer? Thanks.

duane-j-wagner commented 2 months ago

My settings are as shown above.

duane-j-wagner commented 2 months ago

I added a manifest of a Microsoft sample to the shared folder and I was able to get it working. I think the problem with my add-in is related to a content security policy problem where my server is not allowing the add-in to run in a frame. I'll fix that and see what happens. If side-loading is allowed, then the admin docs should be updated.

RuizhiSunMS commented 3 weeks ago

Hi @duane-j-wagner, does this case still block you?

duane-j-wagner commented 3 weeks ago

I still need to test if CSP is the problem in my case. Should be done with that is a week or so.