I am developing a Office 365 Mail Addin in Napa. I am trying to use the object of SP.ClientContext but it shows me error that SP is not defined.
Office.initialize = function (reason) { $(document).ready(function () { app.initialize(); var context = new SP.ClientContext("https://mysite.sharepoint.com/"); // <-- Error var web = context.get_web(); }); };
I would like to know can SharePoint objects like SP.ClientContext, SP.Web, etc. be used while developing Office 365 Mail Addin? If yes, then what is the best approach for the same?