Reputation: 83
Update: It seems like the XML is not the problem and the issue has to do with using a dev tenant. As far as I can tell, it behaves properly using an Office 365 Home account
, but throws a 403 when using an Office 365 Enterprise E3 Developer account
. Why does this throw a 403? Is there anything I can do so we can test if we can get an addin taskpane to auto show with our templates?
Title Edit: from "Excel Online Add in- How to auto show taskpane
" to "Excel Online Add in- 403 when trying to autoshow and addin using a dev tenant
"
Original: I'm trying to auto show an addin following this guide: https://dev.office.com/docs/add-ins/design/automatically-open-a-task-pane-with-a-document
Since the manifest we currently have in the store doesn't use
<TaskpaneId>Office.AutoShowTaskpaneWithDocument</TaskpaneId>
I'm trying to test it out using Script Lab
The <we:webextension>
xml is below
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<we:webextension xmlns:we="http://schemas.microsoft.com/office/webextensions/webextension/2010/11"
id="{8bc018e3-f345-40d4-8f1d-97951765d531}">
<we:reference id="WA104380862" version="1.1.0.2" store="en-US" storeType="OMEX"/>
<we:alternateReferences/>
<we:properties>
<we:property name="Office.AutoShowTaskpaneWithDocument" value="true"/>
</we:properties>
<we:bindings/>
<we:snapshot xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"/>
</we:webextension>
In my <wetp:taskpane>
I've tried setting visibility="1"
and visibility="0"
, but neither seem to work. When it is 1
I get a 403 and this is my console
OsfRuntimeExcelWac.js:12 GET https://store.office.com/gatedserviceextension.aspx?=313351b2_2e0ee2d3_1500571610901&ui=en-US&rs=en-US&ad=US&fromAR=4 403 ()
e5191e878673e5c7.js:1 Uncaught ReferenceError: $ is not defined
at t.n (e5191e878673e5c7.js:1)
at new t (e5191e878673e5c7.js:1)
at e5191e878673e5c7.js:1
MicrosoftAjax.js:5 Refused to set unsafe header "Cookie"
HEAD https://store.office.com/gatedserviceextension.aspx?fromAR=3&corr=41fa9016-d510-90be-877b-25c612f780bb 403 ()
MicrosoftAjax.js:5 Request to /gatedserviceextension.aspx?fromAR=3&corr=41fa9016-d510-90be-877b-25c612f780bb came back with the status code:
When it's 0, there is nothing unusual in the console, but nothing happens.
What am I doing wrong? Am I just misunderstanding what this is supposed to accomplish? When visibility="1"
it looks like it's trying to do something, but isn't allowed. Does it just mean I can't auto load Script Lab? Their manifest suggests that I can.
Any help is appreciated. We're looking at pushing a new version of our Manifest with the proper <TaskpaneId>
to test this, but we wanted a proof of concept first.
Upvotes: 1
Views: 414
Reputation: 586
This is indeed an issue with our code and a fix is underway. It only reproed in certain variations Office 365 for business customers. I'll update my answer once I get confirmation the fix has been fully rolled out.
Upvotes: 2
Reputation: 1
How did you set
<we:property name="Office.AutoShowTaskpaneWithDocument" value="true"/>
in webextension?
Did you modify it directly? You could try to set it by api in script Lab:
Office.context.document.settings.set("Office.AutoShowTaskpaneWithDocument", true);
Office.context.document.settings.saveAsync();
Upvotes: 0