1

I'm developing a search app on word with napa. I want to search keywords on my sharepoint online portal. When i click the search button it gives 'Access is denied' error. My codes are as below. How can i access to my portal?

   $("#search").click(function () {
        var queryUrl = "https://sponlineportal.sharepoint.com/_api/search/query?querytext='" + $("#searchterm").val() + "'&selectproperties='Author,Path,Title,Url";
    $.ajax({ 
        url: queryUrl, 
        method: "GET", 
        headers: {"Accept": "application/json; odata=verbose"}, 
        success: onQuerySuccess, 
        error: onQueryError });
});

enter image description here Thanks in advance!

zuhal
  • 49
  • 1
  • 9

0 Answers0