Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
Important
SharePoint Add-ins reached end of life in SharePoint Online on April 2, 2026. Both SharePoint-hosted and provider-hosted Add-ins are retired and no longer work in SharePoint Online, including government clouds. Add-in development, deployment, and usage guidance is retained for historical reference and for applicable SharePoint Server scenarios, not for new SharePoint Online solutions.
SharePoint Server Add-ins deployed through an on-premises app catalog are not retired by this change. Acquiring SharePoint Add-ins from the public marketplace ended on April 2, 2026 for SharePoint Server.
This retirement does not retire SharePoint REST APIs, CSOM, JSOM, or SharePoint Framework (SPFx). For SharePoint Online, use SPFx for user interface extensions and Microsoft Entra ID for authentication to external applications. See the retirement announcement and Add-in migration guidance.
The approach you take to perform Create, Read, Update and Delete (CRUD) operations in the Managed Metadata Service (MMS) is different in the new SharePoint Add-in model than it was with Full Trust Code. In a typical Full Trust Code (FTC) / Farm Solution scenario, MMS CRUD operations were performed with the SharePoint server-side object model code and deployed via Farm Solutions.
In a SharePoint Add-in model scenario, MMS CRUD operations are performed with the client-side object model (CSOM).
The CSOM provides all of the operations necessary to replicate and synchronize data in the MMS.
High-level guidelines
As a rule of a thumb, we recommend the following high-level guidelines for performing MMS CRUD operations.
- MMS CRUD operations should be implemented with the client-side object model.
- Execute the CSOM code with an account that has the appropriate permissions to perform MMS CRUD operations.
- When synchronizing term sets use the ChangeInformation class because it performs better than using GetAllTerms and enumerating the terms every time you want to sync.
Options to copy and synchronize MMS data
You have a couple of options to copy and synchronize MMS data.
- On-premises
- Copy database
- Use CSOM to copy data
- Use CSOM to sync data
- Office 365
- Use CSOM to copy data
- Use CSOM to sync data
On-premises - copy database
If you have an on-premises SharePoint environment, you can copy the MMS database from one farm to another to quickly replicate terms.
When is it a good fit?
When you have an on-premises SharePoint environment and you're performing a one-way copy of terms, this is a good option because it may be implemented quickly and easily without writing any code.
On-premises & O365 - Use CSOM to copy data
If you have an on-premises or Office 365 SharePoint environment, you can use CSOM to copy MMS data from one farm/tenancy to another. You can include both on-premises and Office 365 farms with this approach.
When is it a good fit?
When you have an on-premises SharePoint or Office 365 or a hybrid environment and you're copying MMS data between two or more SharePoint farms/tenancies, this is a good option because it gives you the flexibility to copy the MMS data from one farm to another.
Getting started
The following sample demonstrates how to perform MMS CRUD operations.
On-premises & O365 - Use CSOM to sync data
If you have an on-premises SharePoint environment, you can use CSOM to sync MMS data between farms. You can include both on-premises and Office 365 farms/tenancies with this approach.
When is it a good fit?
When you have an on-premises SharePoint or Office 365 or a hybrid environment and you're synchronizing MMS data between two or more SharePoint farms/tenancies, this is a good option because it gives you the flexibility to perform true synchronization and include as many sources as you like.
Getting started
The following sample demonstrates how to build a synchronization tool for MMS data.
Related links
- Guidance articles at https://aka.ms/OfficeDevPnPGuidance
- References in MSDN at https://aka.ms/OfficeDevPnPMSDN
PnP samples
- Core.MMS (O365 PnP Sample)
- Core.MMSSync (O365 PnP Sample)
- Samples and content at https://github.com/pnp/PnP
Applies to
- Office 365 multitenant (MT)
- Office 365 Dedicated (D) partly
- SharePoint 2013 on-premises – partly
Patterns for dedicated and on-premises are identical with Add-in model techniques, but there are differences on the possible technologies that can be used.