1
votes

We are in the process of moving an on-premise SharePoint installation to SharePoint Online. We have a number of existing C# web parts that we need to convert. These web parts currently access some of our on-premise data... we need to get the web parts working on SharePoint Online; however, we're not certain of the best approach.

We've looked at BCS, but it seems that it is geared more towards synchronizing lists of data via basic CRUD methods. For many of our applications, we are not looking to synchronize lists, we are looking more towards action-oriented methods on a service that can be called on-demand as needed by the web part.

We don't believe the call can be client-side, as the users will often be accessing SharePoint Online from workstations that are not joined to our domain, and we don't want the user to have to separately authenticate to our service (i.e. we want our service to trust only the SharePoint Online backend).

Our ideal setup would be to have our C# code for the web part call into our web service (hosted on our domain, authenticating with a service account from the SPO secure store), passing the current username from the SharePoint context, and getting back a response that the web part can then use for its processing.

But as we understand, the web parts in SharePoint Online are sandboxed in such a way that they cannot make external HTTPS calls via HttpWebRequest.

We've searched for how-to examples or documentation related to our use case, and haven't found anything saying it's possible or that it's not possible. Does anybody know if it's possible for a web part to get data in this way? Is there some other direction we should be taking to achieve this?

1

1 Answers

2
votes

In SharePoint online, if you are developing a SharePoint hosted app; You will be able to call external endpoints (EPs) after adding these endpoints in the manifest file.

If you haven't added these endpoint to the manifest file, This means you are not permitting the app to call an external EPs.

You don't need BCS in SharePoint online to call external EPs. Here is a sample on how to do this using JavaScript.

https://msdn.microsoft.com/en-us/library/office/fp179895.aspx

Let me know if you have any other questions.