Hi,
I was getting the “appweburl” is undefined error while developing a SharePoint Auto Hosted App.
// Initialize the RequestExecutor with the app web URL.
executor = new SP.RequestExecutor(appweburl);
//Get the URI decoded URLs.
hostweburl =
decodeURIComponent(
getQueryStringParameter(“SPHostUrl”)
);
appweburl =
decodeURIComponent(
getQueryStringParameter(“SPAppWebUrl”)
);
The value of hostweburl was getting passed in the querystring properly, but the value for appweburl was not getting passed.
The way to resolve this issue was to add an empty element to the App.
By default the Autohosted or Provider-hosted template have an empty app web. If the app web is empty SharePoint doesn’t create the app web for you.
That’s how simply adding an empty element fixes the issue.

The post that came to rescue.
http://rainerat.spirit.de/2012/10/05/sharepoint-2013-apps-csom-vs-rest/
Hope it helps.
Discover more from Nishant Rana's Weblog
Subscribe to get the latest posts sent to your email.
