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 configure search 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, the SharePoint Server-side Object Model was used to configure search, and deployed via SharePoint Solutions.
In an SharePoint Add-in model scenario, you use the SharePoint Client-side Object Model (CSOM) or REST API to configure search. This pattern is commonly referred to as the remote provisioning pattern.
High-level guidelines
As a rule of a thumb, we would like to provide the following high-level guidelines to configure search in the new SharePoint Add-in model.
- Use the SharePoint Client-side Object Model (CSOM) API to configure search whenever possible by importing and exporting search configuration settings.
- Not all search configuration settings are currently available via the SharePoint CSOM API.
- See the Export and import customized search configuration settings in SharePoint Server 2013 (TechNet Article) for a list of search configuration settings that can be exported and imported.
- If a search configuration setting is not able to be set using the CSOM then the Administration user interface is required to set configuration values.
- The SharePoint REST API is not capable (at this time) of importing or exporting search configuration settings.
Getting started
The following sample demonstrates how to import and export search settings between SharePoint tenants, site collections and sites.
Related links
- Guidance articles at https://aka.ms/OfficeDevPnPGuidance
- References in MSDN at https://aka.ms/OfficeDevPnPMSDN
- Videos at https://aka.ms/OfficeDevPnPVideos
PnP samples
- Core.SearchSettingsPortability (O365 PnP Sample)
- Samples and content at Microsoft 365 Patterns and Practices (PnP)
Applies to
- Office 365 Multi Tenant (MT)
- Office 365 Dedicated (D)
- SharePoint 2013 on-premises