I have a SharePoint App that I am creating for SharePoint Online. I am leveraging the out of the box SharePoint Snippet in Visual Studio using the listview snippet.
List View Snippet:
<WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" ID="full" Title="loc:full">
<WebPartPages:XsltListViewWebPart runat="server"
ListUrl="https://mySite.sharepoint.com/sites/spdev/demo/Lists/TestList1/AllItems.aspx"
IsIncluded="True"
JsLink="clientTemplate.js"
NoDefaultStyle="TRUE"
PageType="PAGE_NORMALVIEW"
Default="False"
ViewContentTypeId="0x">
</WebPartPages:XsltListViewWebPart>
</WebPartPages:WebPartZone>
The Snippet works great when I'm using a list that I create in Visual Studio but not when I'm trying to read a list that exists on the parent site (within the same site collection). The error I'm getting is:
Untitled
Access denied. You do not have permission to perform this action or access this resource.
However, I have given Full Control to multiple things (in an attempt to get around this error). But I still receive the same message every time.
Is there something that I'm doing wrong?
UPDATE1
I tried modifying the XML to use the ListId instead and it instead errored out and directed me to the web part maintenance page.
<WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" ID="full" Title="loc:full">
<WebPartPages:XsltListViewWebPart runat="server"
ListId="26F0CCFF-3080-49C4-A731-7E4108D5B98A"
IsIncluded="True"
JsLink="clientTemplate.js"
NoDefaultStyle="TRUE"
PageType="PAGE_NORMALVIEW"
Default="False"
ViewContentTypeId="0x">
</WebPartPages:XsltListViewWebPart>
</WebPartPages:WebPartZone>
List Resides At: https://mySite.sharepoint.com/sites/spdev/demo/Lists/TestList1/AllItems.aspx
Web Pat Is At: https://mySite.sharepoint.com/sites/spdev/demo/mySiteListView/Pages/Default.aspx
What am I doing wrong? Is it possible to access a list from a subsite within the same site collection?
Thanks in advance for any helpful input!