Utiliser des données externes dans SharePoint

In your SharePoint Add-ins, you frequently have to retrieve and manipulate data that is exposed by a remote web application or service from within a SharePoint page or component. Because custom code is not allowed on the SharePoint servers, your add-in must use JavaScript for this purpose. The model for SharePoint Add-ins provides multiple options for accessing the remote data and services.

Utiliser la bibliothèque JavaScript inter-domaine de SharePoint pour accéder aux données externes

You can use the cross-domain library to access data in your remote web application if you provide a custom proxy page that is hosted in the remote infrastructure. As the developer, you are responsible for implementing the custom proxy page, and you have to deal with custom logic such as the authentication mechanism, if there is one, to the remote application. Use the cross-domain library if you want the communication between the remote data source and the SharePoint page to occur at the client level.

Pour plus d’informations sur cette utilisation de la bibliothèque, reportez-vous à la rubrique Créer une page de proxy personnalisée pour la bibliothèque inter-domaines dans SharePoint.

Notes

The SharePoint cross-domain library can also be used in the other direction; that is, JavaScript on remote webpages can use it to access data from SharePoint. For more information about this use of the library, see Creating SharePoint Add-ins that use the cross-domain library.

Utiliser le proxy web SharePoint pour accéder aux données externes

You can use the web proxy that is exposed in the JavaScript client object model to access remote data. (The proxy is also available in the .NET client-side object model (CSOM), but you cannot use that object model in code that runs on the SharePoint servers.)

When you use the web proxy, you issue the initial request to SharePoint. In turn, SharePoint requests the data to the specified endpoint and forwards the response back to your page. Use the web proxy when you want the communication between the remote data source and the SharePoint page to occur at the server level.

Pour savoir comment utiliser le proxy, consultez l’article Interroger un service distant à l’aide du proxy web dans SharePoint.

Voir aussi