Two-way sync between third-party XML export and SharePoint Online

%3CLINGO-SUB%20id%3D%22lingo-sub-367397%22%20slang%3D%22en-US%22%3ETwo-way%20sync%20between%20third-party%20XML%20export%20and%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-367397%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20looking%20for%20a%20solution%20to%20connect%20a%20third-party%20application%20with%20SharePoint%20Online%2C%20making%20it%20possible%20to%20edit%20data%20in%20the%20application%20from%20either%20end%20and%20have%20it%20update%20to%20the%20other.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20third%20party%20application%20is%20tied%20to%20a%20Azure%20SQL%20Database%20but%20SharePoint%20is%20not%20hosted%20in%20Azure.%20The%20application%20stores%20data%20using%20proprietary%20methods%20so%20the%20only%20way%20to%20get%20the%20data%20is%20by%20exporting%20it%20as%20an%20XML%20file%2C%20for%20which%20I%20have%20the%20schema%20and%20am%20able%20to%20serialize%20into%20C%23%20classes.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOne%20requirement%20that%20I%20am%20dealing%20with%20is%20that%20we%20would%20like%20this%20data%20connection%20to%20inform%20the%20SharePoint%20metadata%20service%20and%20allow%20tagging%20documents%20based%20on%20certain%20column%20values.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20something%20like%20this%20I%20would%20have%20assumed%20a%20WCF%20service%20would%20be%20necessary%20to%20consume%20the%20XML%20and%20make%20it%20available%20in%20SharePoint%2C%20but%20I%20am%20not%20sure%20where%20we%20would%20host%20this%20as%20we%20do%20not%20host%20SharePoint%20on-premises.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20been%20looking%20into%20solutions%20based%20around%20using%20Azure%20Functions%20or%20hosting%20a%20RESTful%20API%2C%20and%20have%20even%20looked%20into%20building%20a%20SharePoint-Hosted%20Add-In%20for%20the%20external%20content%20type%2C%20but%20I%20am%20not%20sure%20which%20route%20is%20best%20for%20the%20functionality%20I%20desire.%20Looking%20for%20advice%20on%20how%20to%20tackle%20this%20complicated%20request.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-367397%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-382672%22%20slang%3D%22en-US%22%3ERe%3A%20Two-way%20sync%20between%20third-party%20XML%20export%20and%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-382672%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F138334%22%20target%3D%22_blank%22%3E%40Federico%20Porceddu%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20pretty%20new%20to%20Azure%2C%20and%20the%20org%20already%20has%20an%20Domain%20controller%20server%20that%20handles%20AD.%20I%20am%20thinking%20I%20am%20going%20to%20have%20to%20update%20the%20term%20store%20and%20MM%2C%20yes%2C%20or%20add%20an%20external%20content%20type%20to%20handle%20the%20data%20once%20it%20is%20serialized%20from%20XML%2C%20because%20the%20data%20needs%20to%20map%20to%20SharePoint%20as%20well%20as%20a%20custom%20ASP.NET%20web%20application%20(also%20hosted%20in%20Azure).%3C%2FP%3E%3CP%3EOne%20big%20problem%20I%20see%20is%20that%20we%20cannot%20work%20directly%20with%20the%20database%20of%20the%20application%20producing%20the%20XML%20-%20we%20can%20only%20export%20an%20XML%20file%20using%20the%20app's%20interface%20or%20a%20command%20line%20tool%2C%20which%20I%20could%20program%20to%20happen%20on%20a%20schedule%20but%20not%20manually%20as%20a%20trigger%20of%20any%20kind%20(that%20I%20can%20tell).%3C%2FP%3E%3CP%3EOne%20last%20thing%20-%20I%20had%20trouble%20finding%20the%20documentation%20for%20that%20library.%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSharePoint%2FPnP-Sites-Core%2Ftree%2Fmaster%2FCore%2FOfficeDevPnP.Core%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EIs%20this%20it%3F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-368754%22%20slang%3D%22en-US%22%3ERe%3A%20Two-way%20sync%20between%20third-party%20XML%20export%20and%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-368754%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F300284%22%20target%3D%22_blank%22%3E%40conwayjh%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Edid%20you%20need%20to%20update%20your%20Term%20store%20and%20update%20managed%20metadata%3F%3CBR%20%2F%3EIs%20it%20correct%20the%20needs%3F%3C%2FP%3E%3CP%3EImho%2C%20you%20can%20define%20an%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fsolution-guidance%2Fsecurity-apponly-azuread%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20AD%20Application%26nbsp%3B%3C%2FA%3E%20and%20trust%20SharePoint%20Online%20for%20reading%20and%20write%20Metadata%2C%20writing%20an%20azure%20function%20in%20C%23%20and%20SharePoint%20CSOM%20(%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fsolution-guidance%2Ftaxonomy-operations-sample-app-for-sharepoint%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Eexample%3C%2FA%3E).%20In%20this%20way%2C%20with%20an%20application%20id%20and%20a%20self-signed%20cert%2C%20you%20are%20working%20with%20an%20s2s%20authentication.%20The%20Azure%20function%20could%20be%20scheduled.%3C%2FP%3E%3CP%3EI%20suggest%20you%20use%20%3CA%20href%3D%22https%3A%2F%2Fwww.nuget.org%2Fpackages%2FSharePointPnPCoreOnline%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESharePointPnPCoreOnline%3C%2FA%3E%20library%2C%20with%20a%20lot%20of%20useful%20extension%20methods%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20also%20consider%20if%20you%20don't%20need%20high%20reliability%20or%20others%20skills%2C%20Microsoft%20Flow%2C%20there%20is%20%3CA%20href%3D%22https%3A%2F%2Fflow.microsoft.com%2Fen-us%2Fblog%2Fintroducing-triggers-in-the-sql-connector%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ESQL%20Server%20connector%3C%2FA%3E%20that%20could%20trigger%20your%20azure%20function.%20Actually%2C%20there%20is%20not%20REST%20API%20for%20manage%20Terms%20or%20TermSet%20creation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%2C%3C%2FP%3E%3CP%3EFederico%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I am looking for a solution to connect a third-party application with SharePoint Online, making it possible to edit data in the application from either end and have it update to the other.

 

The third party application is tied to a Azure SQL Database but SharePoint is not hosted in Azure. The application stores data using proprietary methods so the only way to get the data is by exporting it as an XML file, for which I have the schema and am able to serialize into C# classes.

 

One requirement that I am dealing with is that we would like this data connection to inform the SharePoint metadata service and allow tagging documents based on certain column values.

 

For something like this I would have assumed a WCF service would be necessary to consume the XML and make it available in SharePoint, but I am not sure where we would host this as we do not host SharePoint on-premises.

 

I have been looking into solutions based around using Azure Functions or hosting a RESTful API, and have even looked into building a SharePoint-Hosted Add-In for the external content type, but I am not sure which route is best for the functionality I desire. Looking for advice on how to tackle this complicated request.

2 Replies
Highlighted

Hi @conwayjh 

did you need to update your Term store and update managed metadata?
Is it correct the needs?

Imho, you can define an Azure AD Application  and trust SharePoint Online for reading and write Metadata, writing an azure function in C# and SharePoint CSOM (example). In this way, with an application id and a self-signed cert, you are working with an s2s authentication. The Azure function could be scheduled.

I suggest you use SharePointPnPCoreOnline library, with a lot of useful extension methods

 

You can also consider if you don't need high reliability or others skills, Microsoft Flow, there is SQL Server connector that could trigger your azure function. Actually, there is not REST API for manage Terms or TermSet creation.

 

Cheers,

Federico

Highlighted

@Federico Porceddu 

I am pretty new to Azure, and the org already has an Domain controller server that handles AD. I am thinking I am going to have to update the term store and MM, yes, or add an external content type to handle the data once it is serialized from XML, because the data needs to map to SharePoint as well as a custom ASP.NET web application (also hosted in Azure).

One big problem I see is that we cannot work directly with the database of the application producing the XML - we can only export an XML file using the app's interface or a command line tool, which I could program to happen on a schedule but not manually as a trigger of any kind (that I can tell).

One last thing - I had trouble finding the documentation for that library. Is this it?