Office JS Api - Permission Denied Issue
Asked Answered
T

2

6

I'm working on an addin for Excel, the manifest has permission for ReadWriteDocument.

I'm adding a handler to Office.EventType.DocumentSelectionChanged Event

First time, I insert the addin in Excel Online, it works perfectly.

Later if the access the Excel, it fails with:

OSF.DDA.Error
code: 7000
message: "You don't have sufficient permissions for this action."
name: "Permission Denied"
Thesis answered 5/3, 2016 at 5:8 Comment(6)
To clarify your repro steps: you're creating it in Excel online, but then opening in Excel desktop? If so, what version? Also, what about re-opening the document in Excel online, does it work or fail?Virulent
I created it using napacloudapp, hosted the app from heroku. then uploaded the manifest to Excel online addins. It works when i insert the addin first time. When i open the excel in excel online again (say next day), the addin window loads, but the event binding fails with the given error.Thesis
Do you have the full minimalistic repro code? If so, do you mind posting it? Also, what happens when you do the same thing starting from Excel desktop?Virulent
This is the repo, github.com/john-e/beer-o-meter, its a nodejs app, that is used to host the addin and get data. check the 'public/App' folder for code. I can't test it using Excel Desktop, because i use Ubuntu.Thesis
I tried it just now using the Excel Online that comes with a SharePoint O365 tenant. It worked for me, both on initial creation and on re-opening. Are you using an O365 tenant?Virulent
@MichaelZlatkovsky-Microsoft: Getting it for Word 2019 (Microsoft® Word 2019 MSO - Version 2110 Build 16.0.14527.20234 - 32-bit ). I'm using VS2019 to create a new Word add-in. Showing a dialog using displayDialogAsync and in there adding dialog.addEventHandler(Office.EventType.DialogMessageReceived, callbackFunc) throws this exception.Nut
T
0

I was seeing this issue as well, and we dug into it and discovered it was in fact a bug in the sideloading feature. It is now fixed, so please try it again!

Cheers, Harrison

Tiptoe answered 8/4, 2016 at 18:37 Comment(0)
C
0

A note to future head scratchers - there are features such as "Select Sensitivity Label" that might be active and can give this error message. This may well not be related to the above error.

If your org requires you to set a sensitivity label, do so, before attempting to use the API giving the error.

Celebration answered 8/1 at 8:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.