Est-il possible de faire des listes SharePoint accessibles Domaine à l'aide de l'API de repos?

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/96997

  •  10-12-2019
  •  | 
  •  

Question

est-il possible de rendre les ressources SharePoint 2013 accessibles via Internet à l'aide de l'API de repos?Dis que je veux faire du caillé avec une liste de l'extérieur de SharePoint.Comment nous pouvons gérer les informations d'identification pour cette situation?J'ai vu des sites (Yammer) utilise SSO en redirigeant les utilisateurs vers son site Web de votre entreprise et en obtenant des informations d'identification à partir de là.Pouvons-nous utiliser la même approche avec API de repos pour les pouvoirs?Si oui, veuillez expliquer comment?(Juste la partie de références)

Était-ce utile?

La solution

Assuming you have SharePoint on-premise and not 365.

Making a client-side only solution is easy if you use apps (SharePoint hosted), but you would have to deploy the app to SharePoint to be able to do cross-domain request.
Microsoft introduced two main solutions for querying cross-domain, SP.RequestExecutor.js for JSOM and /_api/SP.AppContextSite for REST, but as far as I know both of these require that you have an app hosted in a SharePoint environment. Here you don't need to think about authentication, as long as the app deploys that is handled for you.
If you have a stand-alone web site and you want client-side only communication with SharePoint I'm afraid that OOTB this is not possible. I can think of some solutions, as you can enable cross-domain, get access token for OAuth (might be 365 only) server-side or make your own service on SharePoint which supports CORS or JSONP - but this would be far from OOTB.

If you instead do the communication server-side everything will be much easier. I suggest you try making a Provider-hosted app, you will find this option in Visual Studio when creating apps for SharePoint. Then you set up High trust (S2S) which will let your app use CSOM to communiate with your on-premise SharePoint, authenticated as a user.

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top