Making Rest API Call Using AngularJS From Office 365 SharePoint Hosted App To Host Web/Parent Web Application

  • The name “apps for SharePoint” is changing to “SharePoint Add-ins”

    HostWebURL and AppWebURL, which can be obtained from the query string, once the add-in’s are deployed.

  • When we create new SharePoint add-in initially, we will get an error while making AJAX call, using jQuery or $http call, using AngularJS.
  • When we use the cross-domain library, the Webpages in your add-in/app can access the data in add-in domain and the SharePoint domain.
  • The developer site, which is used to develop an app and host SharePoint site , once the add-in is published in an app catalogue.
  • The cross-domain library is a client-side alternative in the form of a JavaScript file (SP.RequestExecutor.js), which is hosted in SharePoint Website, which can be referenced in add-in.

Making Rest API Call using AngularJS from Office 365 SharePoint hosted app to host Web/Parent Web Application.

@parejajd: C# Corner, nuevo artículo Making Rest API Call Using AngularJS From Office 365 SharePoint Hosted App To Host Web/P…

In order to get the values from host Website to the app, we need to use the item given below.

HostWebURL and AppWebURL, which can be obtained from the query string, once the add-in’s are deployed.

When we create new SharePoint add-in initially, we will get an error while making AJAX call, using jQuery or $http call, using AngularJS.

403 -Access is denied error.

CROS request error.

Using JavaScript Object model and whole CRUD operation will be possible but using jQuery or AngularJS , consuming list REST API will be useful. In order to do it, we use SP.Requestor.js file, which enables us to make CROS call to SharePoint Office 365 sites.

When we use the cross-domain library, the Webpages in your add-in/app can access the data in add-in domain and the SharePoint domain. The developer site, which is used to develop an app and host SharePoint site , once the add-in is published in an app catalogue.

The cross-domain library is a client-side alternative in the form of a JavaScript file (SP.RequestExecutor.js), which is hosted in SharePoint Website, which can be referenced in add-in. The cross-domain library lets us interact with more than one domain in remote add-in page through a proxy. 

Making Rest API Call Using AngularJS From Office 365 SharePoint Hosted App To Host Web/Parent Web Application

You might also like More from author

Comments are closed, but trackbacks and pingbacks are open.