From 26c62f7f011d2d84b958faa8b4fa5c9920a70992 Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Mon, 15 Jun 2026 15:26:59 +0530 Subject: [PATCH 01/10] Update doc to clarify modern SharePoint guidance --- .../user-segmentation-in-sharepoint.md | 141 ++---------------- 1 file changed, 11 insertions(+), 130 deletions(-) diff --git a/docs/general-development/user-segmentation-in-sharepoint.md b/docs/general-development/user-segmentation-in-sharepoint.md index f5749f9b32..da74ac91f9 100644 --- a/docs/general-development/user-segmentation-in-sharepoint.md +++ b/docs/general-development/user-segmentation-in-sharepoint.md @@ -5,97 +5,53 @@ ms.date: 09/25/2017 ms.localizationpriority: medium --- +# User segmentation in SharePoint +> **Important (Modern SharePoint update):** +> This article describes a classic SharePoint Server approach using Content Search Web Parts, query rules, and custom server-side code. +> In modern SharePoint (SharePoint Online and SharePoint Server Subscription Edition), this approach is **deprecated or not recommended**. +> Similar outcomes can now be achieved using **Audience Targeting, Microsoft Entra ID groups, Microsoft Search, and modern web parts**. -# User segmentation in SharePoint Display content you tailor for user segments you define—for example, based on locale, interests, gender, or referral links—by using a combination of term sets, the Content Search web part, and query rules in SharePoint. SharePoint provides the building blocks to tailor content you show on a SharePoint site, depending on certain attributes of end-users, for example their gender, where they live, their interests, or referral links. These groupings of user attributes are known as user segments. - - - In SharePoint, this user segmentation functionality can be beneficial in many scenarios, such as: - Displaying different banners on a page depending on the end-user's gender - - - Displaying different discount offers depending on the end-user's locale - - - Displaying different articles on a page depending on the end-user's referrer link (the website that brought the end-user to your page). - To implement user segmentation in SharePoint, you'll do three things: create a term set for each user segment, extend the Content Search web part to make it aware of your user segments, and then use query rules to perform specific actions for each user segment. + ## Prerequisites Before you get started implementing user segmentation in SharePoint, be sure to have the following installed in your development environment: - - - - - SharePoint - - - Visual Studio 2012 - -This article assumes that you have experience with developing web parts in SharePoint. For more information on developing web parts, refer to [Building Block: web parts](https://msdn.microsoft.com/library/ee535520%28v=office.14%29.aspx) - - - +This article assumes that you have experience with developing web parts in SharePoint. For more information on developing web parts, refer to [Building Block: web parts](previous-versions/office/developer/sharepoint-2010/ee535520(v=office.14)). ## Overview on adding user segmentation functionality to your SharePoint site Figure 1 shows the basic steps to add user segmentation functionality to your SharePoint site. - - - **Figure 1. Steps to add user segmentation functionality to your SharePoint site** - - - - - - - ![Steps to add user segmentation functionality](../images/SP15_User_Segmentation_with_ContentBySearchWebPart.jpg) - - - - - - - - - - - ## Create a term set -A term is a word or a phrase that can be associated with an item in SharePoint. Aterm set is a collection of related terms. For more information, see [Overview of managed metadata in SharePoint](https://technet.microsoft.com/library/ee424402.aspx). You can create term sets either through the SharePoint Term Store Management Tool, or programmatically. +A term is a word or a phrase that can be associated with an item in SharePoint. A term set is a collection of related terms. For more information, see [Overview of managed metadata in SharePoint](https://technet.microsoft.com/library/ee424402.aspx). You can create term sets either through the SharePoint Term Store Management Tool, or programmatically. > [!NOTE] > See the following topics for detailed instructions on how to use the Term Store Management Tool to create your term set:> [Set up a new term set](/sharepoint/set-up-new-term-set)> [Create and manage terms in a term set](/sharepoint/create-and-manage-terms) - - - -You can create a term set programmatically by using the types exposed via [Microsoft.SharePoint.Taxonomy](https://msdn.microsoft.com/library/Microsoft.SharePoint.Taxonomy.aspx) . The following code example shows how to create a **TermSet** object and obtain the **NavigationTermSet**. Next, you create **Term** objects within your **TermSet**. Finally, commit these changes to the **TermStore** and load the **TermSet** to use for navigation. - - +You can create a term set programmatically by using the types exposed via [Microsoft.SharePoint.Taxonomy](/previous-versions/office/sharepoint-server/ee583437(v=office.15)) . The following code example shows how to create a **TermSet** object and obtain the **NavigationTermSet**. Next, you create **Term** objects within your **TermSet**. Finally, commit these changes to the **TermStore** and load the **TermSet** to use for navigation. Each term you add to your term set receives a unique identifier. This identifier is the key to making the [Content Search web part](content-search-web-part-in-sharepoint.md) aware of your user segments. - - - - - ```csharp static void CreateNavigationTermSet(string siteUrl) @@ -132,34 +88,23 @@ static void CreateNavigationTermSet(string siteUrl) } ``` - ## Create a custom web part for user segmentation In Visual Studio 2012, create a custom web part by using the Visual web parts template from the SharePoint category. Your custom web part must inherit from the [Content Search web part](content-search-web-part-in-sharepoint.md) object. > [!NOTE] -> This article assumes that you have experience with developing web parts in SharePoint. For more information on developing web parts, refer to [Building Block: web parts](https://msdn.microsoft.com/library/ee535520%28v=office.14%29.aspx) - - - - +> This article assumes that you have experience with developing web parts in SharePoint. For more information on developing web parts, refer to [Building Block: web parts](/previous-versions/office/developer/sharepoint-2010/ee535520(v=office.14)) ## Configure a custom web part with user segmentation logic In your custom web part, you can re-implement either the  `OnLoad()` method or the `OnInit()` method to carry out your custom logic. Both these methods are useful to set or customize properties of the [Content Search web part](content-search-web-part-in-sharepoint.md) object. - - - ### Example 1: Add Male and Female user segments to your SharePoint site To add **Male** and **Female** user segments, you can re-implement the `OnLoad()` method as shown in the following code. - - - ```csharp protected override void OnLoad(EventArgs e) @@ -178,11 +123,6 @@ protected override void OnLoad(EventArgs e) The corresponding **AddMycustomProperties** method would look like the following code. - - - - - ```csharp private void AddMycustomProperties(object sender, BeforeSerializeToClientEventArgs e) @@ -219,9 +159,6 @@ private void AddMycustomProperties(object sender, BeforeSerializeToClientEventAr To create user segments based on the type of web browser the end-user is using, to view your SharePoint site, re-implement the **OnLoad** method as shown in the following code. - - - ```csharp protected override void OnLoad(EventArgs e) @@ -240,11 +177,6 @@ protected override void OnLoad(EventArgs e) The code for the **AddMycustomProperties** method would look like the following example. - - - - - ```csharp private void AddMycustomProperties(object sender, BeforeSerializeToClientEventArgs e) @@ -272,99 +204,48 @@ private void AddMycustomProperties(object sender, BeforeSerializeToClientEventAr } ``` - ## Upload the custom web part to the SharePoint Web Part Gallery In order to use your custom web part in your page, you need to upload the web part to the **SharePoint Web Part Gallery**. - - In the **SharePoint Web Part Gallery**, choose **Site Settings**, and then choose **Web parts** under **Web Designer Galleries**. On the **Files** tab, choose **Upload Document**. - - - ## Add query rules to carry out specific actions that depend on the user segment A query rule transforms queries to improve the relevance of search results by reacting intelligently to what the user might be trying to find. In a query rule, you specify conditions and correlated actions. When a query meets the conditions in a query rule, the search system performs the actions specified in the rule to improve the relevance of the search results, such as narrowing down the results or changing the order in which results are displayed. - - When implementing user segmentation, you use query rules to define conditions and actions for the defined user segments. When an end-user is part of a particular user segment, the query rule will activate and the [Content Search web part](content-search-web-part-in-sharepoint.md) will display content that is tailored for that particular user segment. - - - ### To create a query rule that will activate for a particular user segment - - 1. In your publishing site collection in **Site Settings**, choose **Site Collection Administration**, and then choose **Search Query Rules**. - - 2. Choose a result source, and then choose **New Query Rule**. - - 3. Type a rule name in the **Rule Name** field. Then, click to expand **Context**. - - 4. Under the **Query is performed by these user segments** section, choose **One of these user segments**, and then click **Add User Segment**. - - 5. In the **Title** field, type a name for this user segment query rule. Choose **Add user segment term**. - - 6. In the **Import from term store** dialog box, expand the **Managed Metadata Service**. Under **Site Collection**, locate the term set that holds the user segmentation terms that you previously defined in [Create a term set](#SP15_Create_a_term_set). Select the user segment for which you want to apply this query rule. Then, click **Save**. - - 7. Name your user segment n the **Add User Segment** dialog box. - You have now mapped a query rule to a user segment, which in turn is mapped to a user segment term. - - 8. Under **Query Conditions**, choose **Remove Condition**. - - This specifies that the query configured in the [Content Search web part](content-search-web-part-in-sharepoint.md) will act as the query condition. - - + This specifies that the query configured in the [Content Search web part](content-search-web-part-in-sharepoint.md) will act as the query condition. 9. Set the corresponding actions that your query rule will perform. Under the **Actions** section, select a corresponding action that you want to take as a result of -your query rule. You can select to either **Add Promoted Result** or **Add a Result Block**. - - 10. Save your query rule. - - 11. Repeat steps 1 through 10 for your other user segments, depending on the actions you want to perform. - - ## Add a custom web part to the SharePoint page and configure it to show the query rule You need to add your custom web part to your SharePoint page. - - - ### To add your custom web part - 1. Navigate to a category page, choose **Edit page**, and then choose **Edit page template**. - - 2. Select **Add a web part** in the top section of the page. Then, select your custom web part from the drop-down menu in the upper right corner of the web part. - - 3. Click **Edit web part**. - - 4. Expand the **Settings** section, and in the **Result Table** field, choose **SpecialTermResults**. - - 5. Save your configuration. - - ## See also - [Build sites for SharePoint](build-sites-for-sharepoint.md) From 220471864e22f1ed2c4009f2cf2577d5fb311f80 Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Mon, 15 Jun 2026 15:49:16 +0530 Subject: [PATCH 02/10] Revise information management policy guidance for SP Add-in --- ...ion-management-policy-sharepoint-add-in.md | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/docs/solution-guidance/information-management-policy-sharepoint-add-in.md b/docs/solution-guidance/information-management-policy-sharepoint-add-in.md index 38cef1cb27..75d9bc1bc5 100644 --- a/docs/solution-guidance/information-management-policy-sharepoint-add-in.md +++ b/docs/solution-guidance/information-management-policy-sharepoint-add-in.md @@ -6,6 +6,10 @@ ms.localizationpriority: medium --- # Information management policy in the SharePoint Add-in model +> **Important (Modern SharePoint update):** +> The SharePoint Add-in (App) model described in this article is **deprecated and no longer recommended for new development** in SharePoint Online. +> Modern solutions should use **SharePoint Framework (SPFx), Microsoft Graph, Microsoft Purview, and Microsoft 365 compliance capabilities** instead. + The approach you take to apply information management policy 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, information management policy was managed and applied via the SharePoint Server Side Object Model and deployed via SharePoint Farm Solutions, usually as part of a Timer Job. In a SharePoint Add-in model scenario, the SharePoint Client Side Object Model (CSOM) and remote timer jobs are used to manage and apply information management policy. @@ -18,7 +22,7 @@ As a rule of a thumb, we would like to provide the following high level guidelin - When using the remote model and CSOM to set information management policies a site collection owner cannot disable them. The remote model approach is a more enterprise friendly model that ensures information management policies are always enabled throughout a SharePoint environment. - Use the SharePoint CSOM in a remote timer job to manage and apply information management policies. - Ensure you are not violating the Office 365 SharePoint API throttle limits when working with large data sets and recursive crawls as you inspect artifacts in your SharePoint sites and apply information management policies to them accordingly. - - The [Core.Throttling (O365 Pnp Sample)](https://github.com/SharePoint/PnP/tree/master/Samples/Core.Throttling) demonstrates how to write intelligent code to handle Office 365 SharePoint API throttling. + - The [Core.Throttling (O365 Pnp Sample)](https://github.com/pnp/PnP/tree/master/Samples/Core.Throttling) demonstrates how to write intelligent code to handle Office 365 SharePoint API throttling. > [!NOTE] > Currently, the CSOM does not have methods to set retention on content types (only on sites). @@ -27,23 +31,16 @@ As a rule of a thumb, we would like to provide the following high level guidelin The following O365 PnP Code Sample and video demonstrates how to manage and apply information management policy for SharePoint sites. In this example, the code iterates through the content types applied to document libraries in SharePoint site collections and applies a retention policy. -- [Governance.ContentTypeEnforceRetention (O365 PnP Code Sample)](https://github.com/SharePoint/PnP/tree/master/Solutions/Governance.ContentTypeEnforceRetention) - -The following video walks through the code sample. - -- [Information management policy with app model (O365 PnP Video)](https://channel9.msdn.com/blogs/OfficeDevPnP/Information-management-policy-wtih-app-model) +- [Governance.ContentTypeEnforceRetention (O365 PnP Code Sample)](https://github.com/pnp/PnP/tree/master/Solutions/Governance.ContentTypeEnforceRetention) ## Related links -- [Information management policy with app model (O365 PnP Video)](https://channel9.msdn.com/blogs/OfficeDevPnP/Information-management-policy-wtih-app-model) -- Guidance articles at [https://aka.ms/OfficeDevPnPGuidance](https://aka.ms/OfficeDevPnPGuidance "Guidance Articles") -- References in MSDN at [https://aka.ms/OfficeDevPnPMSDN](https://aka.ms/OfficeDevPnPMSDN "References in MSDN") -- Videos at [https://aka.ms/OfficeDevPnPVideos](https://aka.ms/OfficeDevPnPVideos "Videos") +- [Office 365 development and SharePoint PnP solution guidance](https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/office-365-development-patterns-and-practices-solution-guidance) ## PnP samples -- [Governance.ContentTypeEnforceRetention (O365 PnP Code Sample)](https://github.com/SharePoint/PnP/tree/master/Solutions/Governance.ContentTypeEnforceRetention) -- Samples and content at https://github.com/SharePoint/PnP +- [Governance.ContentTypeEnforceRetention (O365 PnP Code Sample)](https://github.com/pnp/PnP/tree/master/Solutions/Governance.ContentTypeEnforceRetention) +- Samples and content at https://github.com/pnp/PnP ## Applies to From ad1a4f513dbb55d54a34ea5234d75d7ec07ed76f Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Tue, 16 Jun 2026 10:55:56 +0530 Subject: [PATCH 03/10] Added deprecation note and corrected links --- .../how-tos-for-sharepoint.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/general-development/how-tos-for-sharepoint.md b/docs/general-development/how-tos-for-sharepoint.md index 5acfb2ba59..3869dbf436 100644 --- a/docs/general-development/how-tos-for-sharepoint.md +++ b/docs/general-development/how-tos-for-sharepoint.md @@ -11,6 +11,12 @@ ms.localizationpriority: high Find how-to articles and related code examples that show how to perform basic development tasks in SharePoint, including how to set up your development environment and start building sites, SharePoint Framework and SharePoint Add-ins. +> **Important notice: SharePoint Add-ins are deprecated** +> +> SharePoint Add-ins (including provider-hosted and SharePoint-hosted add-ins) are a legacy development model. They are no longer recommended for new development and have been largely superseded by SharePoint Framework (SPFx), Microsoft Graph, and Microsoft 365 development patterns. +> +> This page includes both modern SharePoint Framework (SPFx) guidance and legacy SharePoint Add-in content for reference purposes only. For new solutions, use SPFx and Microsoft 365 developer services instead. + ## Getting started how-tos for SharePoint Framework |Title|Summary| @@ -65,7 +71,6 @@ Find how-to articles and related code examples that show how to perform basic de |Title|Summary| |:-----|:-----| -| [Add license checks to your apps for Office](https://msdn.microsoft.com/library/fp161347.aspx) |Learn how to add code to your Office Add-in that checks the validity of a user's app license, and takes action based on the app license properties. Load test app license tokens to test your license checking code. | | [Add license checks to Office and SharePoint Add-ins](/office/dev/store/add-license-checks-to-office-and-sharepoint-add-ins) |Learn how to add code to your SharePoint Add-in that checks the validity of a user's app license, and takes action based on the app license properties. Load test app license tokens to test your license checking code. | ## Setting up your dev environment how-tos for developing sites and solutions in SharePoint @@ -106,7 +111,7 @@ Find how-to articles and related code examples that show how to perform basic de |Title|Summary| |:-----|:-----| | [Use code to pin terms to navigation term sets in SharePoint](how-to-use-code-to-pin-terms-to-navigation-term-sets-in-sharepoint.md) |Learn how to use code to pin terms to navigation term sets. | -| [Create device channels in SharePoint](https://msdn.microsoft.com/library/339c7dba-95ee-46e0-8c76-0fe1adb6f366.aspx) |Learn how to create a device channel, change a device channel, delete a device channel, and reorder device channels in SharePoint. | +| [Create device channels in SharePoint](/sharepoint/dev/general-development/sharepoint-design-manager-device-channels#create) |Learn how to create a device channel, change a device channel, delete a device channel, and reorder device channels in SharePoint. | | [Map a network drive to the SharePoint Master Page Gallery](how-to-map-a-network-drive-to-the-sharepoint-master-page-gallery.md) |Learn how to map a network drive to the Master Page Gallery so that you can use Design Manager to upload design files in SharePoint. | | [Convert an HTML file into a master page in SharePoint](how-to-convert-an-html-file-into-a-master-page-in-sharepoint.md) |With Design Manager, you can convert an .html file into a SharePoint master page, a .master file. After the conversion, the HTML file and master page are associated, so that when you edit and save the HTML file, the changes are synced to the associated master page. | | [Apply a master page to a site in SharePoint](how-to-apply-a-master-page-to-a-site-in-sharepoint.md) |Learn how to map a master page to a SharePoint site. | @@ -118,8 +123,8 @@ Find how-to articles and related code examples that show how to perform basic de | [Add a web part zone snippet in SharePoint](how-to-add-a-web-part-zone-snippet-in-sharepoint.md) |A web part zone is a snippet that you can add to a page layout so that content authors can add, edit, or delete web parts in that zone. | | [Add a Security Trim snippet in SharePoint](how-to-add-a-security-trim-snippet-in-sharepoint.md) |You can use a Security Trim snippet to display content only to specific users, based on a specific permission that those users must have and whether the users are authenticated or anonymous. | | [SharePoint Design Manager image renditions](sharepoint-design-manager-image-renditions.md) |Learn how to create, edit, or delete image renditions. An image rendition defines the dimensions that are used to display images in SharePoint publishing sites. | -| [Add an image rendition to a page in SharePoint](https://msdn.microsoft.com/library/fp161347.aspx) |Learn how to use image renditions in a SharePoint publishing site. | -| [Crop an image rendition in SharePoint](https://msdn.microsoft.com/library/fp161347.aspx) |Learn how to specify the portion of the image to use in an image rendition. | +| [Add an image rendition to a page in SharePoint](/sharepoint/dev/general-development/sharepoint-design-manager-image-renditions#add-an-image-rendition) |Learn how to use image renditions in a SharePoint publishing site. | +| [Crop an image rendition in SharePoint](/sharepoint/dev/general-development/sharepoint-design-manager-image-renditions#crop-an-image-rendition) |Learn how to specify the portion of the image to use in an image rendition. | ## Workflow how-tos for SharePoint @@ -135,8 +140,8 @@ Find how-to articles and related code examples that show how to perform basic de | [Read and write to the social feed by using the REST service in SharePoint](how-to-learn-to-read-and-write-to-the-social-feed-by-using-the-rest-service-in-s.md) |Create a SharePoint-hosted app that uses the REST service to publish a post and get the personal feed for the current user. | | [Create and delete posts and retrieve the social feed by using the .NET client object model in SharePoint](how-to-create-and-delete-posts-and-retrieve-the-social-feed-by-using-the-net-cli.md) |Learn how to create and delete microblog posts and retrieve social feeds by using the SharePoint .NET client object model. | | [Create and delete posts and retrieve the social feed by using the JavaScript object model in SharePoint](how-to-create-and-delete-posts-and-retrieve-the-social-feed-by-using-the-javascr.md) |Learn how to create and delete microblog posts and retrieve social feeds by using the SharePoint JavaScript object model. | -| [Include mentions, tags, and links to sites and documents in posts in SharePoint](how-to-include-mentions-tags-and-links-to-sites-and-documents-in-posts-in-sharep.md) |Learn how to add [SocialDataItem](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialDataItem.aspx) objects to microblog posts, which render as mentions, tags, or links in SharePoint social feeds. | -| [Embed images, videos, and documents in posts in SharePoint](how-to-embed-images-videos-and-documents-in-posts-in-sharepoint-server.md) |Learn how to add [SocialAttachment](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialAttachment.aspx) objects to microblog posts, which render as embedded pictures, videos, and documents in SharePoint social feeds. | +| [Include mentions, tags, and links to sites and documents in posts in SharePoint](how-to-include-mentions-tags-and-links-to-sites-and-documents-in-posts-in-sharep.md) |Learn how to add [SocialDataItem](/previous-versions/office/sharepoint-csom/jj164135(v=office.15)) objects to microblog posts, which render as mentions, tags, or links in SharePoint social feeds. | +| [Embed images, videos, and documents in posts in SharePoint](how-to-embed-images-videos-and-documents-in-posts-in-sharepoint-server.md) |Learn how to add [SocialAttachment](/previous-versions/office/sharepoint-csom/jj163900(v=office.15)) objects to microblog posts, which render as embedded pictures, videos, and documents in SharePoint social feeds. | | [Follow people by using the .NET client object model in SharePoint](how-to-follow-people-by-using-the-net-client-object-model-in-sharepoint.md) |Learn how to work with Following People features by using the SharePoint .NET client object model. | | [Follow people by using the JavaScript object model in SharePoint](how-to-follow-people-by-using-the-javascript-object-model-in-sharepoint.md) |Learn how to work with Following People features by using the SharePoint JavaScript object model. | | [Follow documents and sites by using the .NET client object model in SharePoint](how-to-follow-documents-and-sites-by-using-the-net-client-object-model-in-sharep.md) |Learn how to work with Following Content features by using the SharePoint .NET client object model. | @@ -192,7 +197,7 @@ Find how-to articles and related code examples that show how to perform basic de |Title|Summary| |:-----|:-----| | [Create a claims provider in SharePoint](how-to-create-a-claims-provider-in-sharepoint.md) |Learn how to create and implement a SharePoint claims provider that fulfills the requirements for claims augmentation and claims picking. | -| [Deploy a claims provider in SharePoint](how-to-deploy-a-claims-provider-in-sharepoint.md) |Learn how to deploy a SharePoint claims provider by using the features infrastructure and creating a class that inherits from [SPClaimProviderFeatureReceiver](https://msdn.microsoft.com/library/Microsoft.SharePoint.Administration.Claims.SPClaimProviderFeatureReceiver.aspx). | +| [Deploy a claims provider in SharePoint](how-to-deploy-a-claims-provider-in-sharepoint.md) |Learn how to deploy a SharePoint claims provider by using the features infrastructure and creating a class that inherits from [SPClaimProviderFeatureReceiver](/previous-versions/office/sharepoint-server/ee559827(v=office.15)). | ## See also From 58bc0669c0941d0edf5aa9ea7797635a7e80425b Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Tue, 16 Jun 2026 11:26:15 +0530 Subject: [PATCH 04/10] updated links --- ...ollaboration-features-in-sharepoint-201.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/general-development/what-s-new-for-developers-in-social-and-collaboration-features-in-sharepoint-201.md b/docs/general-development/what-s-new-for-developers-in-social-and-collaboration-features-in-sharepoint-201.md index c6bae341c1..613e1f1cae 100644 --- a/docs/general-development/what-s-new-for-developers-in-social-and-collaboration-features-in-sharepoint-201.md +++ b/docs/general-development/what-s-new-for-developers-in-social-and-collaboration-features-in-sharepoint-201.md @@ -26,10 +26,10 @@ The **Newsfeed** page on SharePoint displays several of these improvements, incl ### New Social namespace provides APIs for social feeds and following people and content -The **Social** namespace contains the primary API for working with feeds and microblog posts and for following people and content. For more information, see [Microsoft.SharePoint.Client.Social](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.aspx) for the .NET client object model, [SP.Social](https://msdn.microsoft.com/library/43d47f01-c085-0e77-bd01-48bcb7d5bb35%28Office.15%29.aspx) for the JavaScript object model, and [Microsoft.Office.Server.Social](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.aspx) for the server object model. +The **Social** namespace contains the primary API for working with feeds and microblog posts and for following people and content. For more information, see [Microsoft.SharePoint.Client.Social](/previous-versions/office/sharepoint-csom/jj164417(v=office.15)) for the .NET client object model, [SP.Social](/previous-versions/office/sharepoint-visio/jj628683(v=office.15)) for the JavaScript object model, and [Microsoft.Office.Server.Social](/previous-versions/office/sharepoint-server/jj264549(v=office.15)) for the server object model. > [!NOTE] -> The API in the [Microsoft.Office.Server.ActivityFeed](https://msdn.microsoft.com/library/Microsoft.Office.Server.ActivityFeed.aspx) namespace is deprecated. See [Deprecated and removed My Site Social API and features](#bkmk_DeprecatedAPI). +> The API in the [Microsoft.Office.Server.ActivityFeed](/previous-versions/office/sharepoint-server/ee584594(v=office.15)) namespace is deprecated. See [Deprecated and removed My Site Social API and features](#bkmk_DeprecatedAPI). @@ -37,11 +37,11 @@ The **Social** namespace contains the primary API for working with feeds and mic ### New client APIs for social feeds, following people and content, and user properties in SharePoint -SharePoint includes new client APIs that you can use to work with social feeds, follow people and content, and retrieve user properties in online, on-premises, and mobile development. When possible, you should use client APIs for SharePoint development instead of using the server object model or web services. Client APIs include managed client object models, a JavaScript object model, and a Representational State Transfer (REST) service. If you are developing an SharePoint Add-in, you must use a client API. +SharePoint includes new client APIs that you can use to work with social feeds, follow people and content, and retrieve user properties in online, on-premises, and mobile development. When possible, you should use client APIs for SharePoint development instead of using the server object model or web services. Client APIs include managed client object models, a JavaScript object model, and a Representational State Transfer (REST) service. If you are developing a SharePoint Add-in, you must use a client API. -Not all server-side functionality in the Microsoft.Office.Server.UserProfiles assembly is available from client APIs. For example, there's no client-side access to the API in the [Microsoft.Office.Server.Audience](https://msdn.microsoft.com/library/Microsoft.Office.Server.Audience.aspx) namespace, the [Microsoft.Office.Server.ReputationModel](https://msdn.microsoft.com/library/Microsoft.Office.Server.ReputationModel.aspx) namespace, or the [Microsoft.Office.Server.SocialData](https://msdn.microsoft.com/library/Microsoft.Office.Server.SocialData.aspx) namespace. To see which APIs are available, see the [Microsoft.SharePoint.Client.Social](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.aspx) namespace and the [Microsoft.SharePoint.Client.UserProfiles](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.UserProfiles.aspx) namespace. +Not all server-side functionality in the Microsoft.Office.Server.UserProfiles assembly is available from client APIs. For example, there's no client-side access to the API in the [Microsoft.Office.Server.Audience](/previous-versions/office/sharepoint-server/ms559937(v=office.15)) namespace, the [Microsoft.Office.Server.ReputationModel](/previous-versions/office/sharepoint-server/jj884389(v=office.15)) namespace, or the [Microsoft.Office.Server.SocialData](/previous-versions/office/sharepoint-server/ee579636(v=office.15)) namespace. To see which APIs are available, see the [Microsoft.SharePoint.Client.Social](/previous-versions/office/sharepoint-csom/jj164417(v=office.15)) namespace and the [Microsoft.SharePoint.Client.UserProfiles](/previous-versions/office/sharepoint-csom/jj163481(v=office.15)) namespace. @@ -165,18 +165,18 @@ SharePoint includes new objects that represent users and user properties: -- The [SocialActor](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialActor.aspx) object represents users (and other entities) for feed and following activities. +- The [SocialActor](/previous-versions/office/sharepoint-csom/jj164459(v=office.15)) object represents users (and other entities) for feed and following activities. -- The [PersonProperties](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.UserProfiles.PersonProperties.aspx) object contains general user properties and user profile properties. +- The [PersonProperties](/previous-versions/office/sharepoint-csom/jj164752(v=office.15)) object contains general user properties and user profile properties. > [!NOTE] -> Server object model versions are the [SPSocialActor](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialActor.aspx) object and the [PersonProperties](https://msdn.microsoft.com/library/Microsoft.Office.Server.UserProfiles.PersonProperties.aspx) object. +> Server object model versions are the [SPSocialActor](/previous-versions/office/sharepoint-server/jj275459(v=office.15)) object and the [PersonProperties](/previous-versions/office/sharepoint-server/jj274629(v=office.15)) object. -SharePoint also includes a new client-side [UserProfile](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.UserProfiles.UserProfile.aspx) object that provides methods you can use to create a personal site for the current user. However, it does not contain all the user properties that the server-side [UserProfile](https://msdn.microsoft.com/library/Microsoft.Office.Server.UserProfiles.UserProfile.aspx) object contains. To access all user properties from client-side code, use the [PeopleManager.GetMyProperties](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.UserProfiles.PeopleManager.GetMyProperties.aspx) method or [PeopleManager.GetPropertiesFor](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.UserProfiles.PeopleManager.GetPropertiesFor.aspx) method (user profile properties are stored in the [PersonProperties.UserProfileProperties](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.UserProfiles.PersonProperties.UserProfileProperties.aspx) property) or use the [PeopleManager.GetUserProfilePropertiesFor](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.UserProfiles.PeopleManager.GetUserProfilePropertiesFor.aspx) method or [PeopleManager.GetUserProfilePropertyFor](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.UserProfiles.PeopleManager.GetUserProfilePropertyFor.aspx) method. +SharePoint also includes a new client-side [UserProfile](/previous-versions/office/sharepoint-csom/jj164616(v=office.15)) object that provides methods you can use to create a personal site for the current user. However, it does not contain all the user properties that the server-side [UserProfile](/previous-versions/office/sharepoint-server/ms566874(v=office.15)) object contains. To access all user properties from client-side code, use the [PeopleManager.GetMyProperties](/previous-versions/office/sharepoint-csom/jj164086(v=office.15)) method or [PeopleManager.GetPropertiesFor](/previous-versions/office/sharepoint-csom/jj163877(v=office.15)) method (user profile properties are stored in the [PersonProperties.UserProfileProperties](/previous-versions/office/sharepoint-csom/jj163311(v=office.15)) property) or use the [PeopleManager.GetUserProfilePropertiesFor](/previous-versions/office/sharepoint-csom/jj164532(v=office.15)) method or [PeopleManager.GetUserProfilePropertyFor](/previous-versions/office/sharepoint-csom/jj164288(v=office.15)) method. @@ -184,7 +184,7 @@ SharePoint also includes a new client-side [UserProfile](https://msdn.microsoft ### New client-side people picker control -The client-side People Picker control is an HTML and JavaScript control that provides cross-browser support for selecting people, groups, and claims. You can configure the picker with the same settings as the server-side version of the control, including control-specific properties (like allowing multiple users or users and groups) and web application-level configuration settings (like Active Directory Domain Services parameters or targeting particular forests). For more information, see [Use the client-side People Picker control in SharePoint-hosted SharePoint Add-ins](https://msdn.microsoft.com/library/383f265f-ed44-4d09-b2f6-366f13d52347%28Office.15%29.aspx). +The client-side People Picker control is an HTML and JavaScript control that provides cross-browser support for selecting people, groups, and claims. You can configure the picker with the same settings as the server-side version of the control, including control-specific properties (like allowing multiple users or users and groups) and web application-level configuration settings (like Active Directory Domain Services parameters or targeting particular forests). For more information, see [Use the client-side People Picker control in SharePoint-hosted SharePoint Add-ins](/sharepoint/dev/sp-add-ins/use-the-client-side-people-picker-control-in-sharepoint-hosted-sharepoint-add-in). @@ -197,7 +197,7 @@ The following My Site Social API and features are deprecated in SharePoint: -- The API in the [Microsoft.Office.Server.ActivityFeed](https://msdn.microsoft.com/library/Microsoft.Office.Server.ActivityFeed.aspx) namespace is deprecated. The **Social** namespace provides the API for programmatically working with social feeds in SharePoint. For backward compatibility, **ActivityEvent** items from SharePoint 2010 are displayed in SharePoint feeds as events that cannot be replied to. (Legacy event migration must be enabled in Central Administration.) +- The API in the [Microsoft.Office.Server.ActivityFeed](/previous-versions/office/sharepoint-server/ee584594(v=office.15)) namespace is deprecated. The **Social** namespace provides the API for programmatically working with social feeds in SharePoint. For backward compatibility, **ActivityEvent** items from SharePoint 2010 are displayed in SharePoint feeds as events that cannot be replied to. (Legacy event migration must be enabled in Central Administration.) - The My Site RSS feed (ActivityFeed.aspx) is replaced with new APIs in the REST service, the client object model, and the JavaScript object model. To migrate custom SharePoint 2010 code that uses this API (preferably a client API), replace all requests to ActivityFeed.aspx with calls to the new API and handle feed data that is returned in JavaScript Object Notation (JSON) format. @@ -214,7 +214,7 @@ The following My Site Social API and features are deprecated in SharePoint: - The following activity events no longer automatically inform the feed: profile update, upcoming birthday, upcoming workplace anniversary, new membership, and change of manager. However, you can create custom event receivers for these activities. No new social events have been added. -- The following fields in the [Privacy](https://msdn.microsoft.com/library/Microsoft.Office.Server.UserProfiles.Privacy.aspx) enumeration are deprecated: **Contacts**, **Organization**, and **Manager**. SharePoint offers only **Private** ( **Only Me**) and **Public** ( **Everyone**) privacy settings. Existing privacy settings are retained until they are changed by the user. To migrate custom SharePoint 2010 code that uses this API, replace all references to the deprecated privacy fields. +- The following fields in the [Privacy](/previous-versions/office/sharepoint-server/ms518310(v=office.15)) enumeration are deprecated: **Contacts**, **Organization**, and **Manager**. SharePoint offers only **Private** ( **Only Me**) and **Public** ( **Everyone**) privacy settings. Existing privacy settings are retained until they are changed by the user. To migrate custom SharePoint 2010 code that uses this API, replace all references to the deprecated privacy fields. - The **Following People** API that is accessed from the **SocialFollowingManager** replaces the **Colleagues** functionality from SharePoint Server 2010. The **Colleagues** page is replaced with the **People I'm following** page. The **Groups** feature that enabled users to organize colleagues into groups is no longer available. @@ -243,13 +243,13 @@ The following list contains information for developing with Community Site featu -- Community Sites use the **Community** site template ( [Id](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.WebTemplate.Id.aspx) = **62**). The site template is not available for public websites. The template type of the discussion board list is [DiscussionBoard](/previous-versions/office/sharepoint-server/ee541191(v=office.15)) (value = **108**). +- Community Sites use the **Community** site template ( [Id](/previous-versions/office/sharepoint-server/ee544844(v=office.15)) = **62**). The site template is not available for public websites. The template type of the discussion board list is [DiscussionBoard](/previous-versions/office/sharepoint-server/ee541191(v=office.15)) (value = **108**). - Activating the **Community Site** feature activates the **CommunityEventReceiver** event receiver. -- To customize the client-side rendered list view, you must use JavaScript overrides to replace the view. List views cannot be extended through the SharePoint API. For more information, see [Customize a list view in SharePoint Add-ins using client-side rendering](https://msdn.microsoft.com/library/8d5cabb2-70d0-46a0-bfe0-9e21f8d67d86%28Office.15%29.aspx). +- To customize the client-side rendered list view, you must use JavaScript overrides to replace the view. List views cannot be extended through the SharePoint API. For more information, see [Customize a list view in SharePoint Add-ins using client-side rendering](/sharepoint/dev/sp-add-ins/customize-a-list-view-in-sharepoint-add-ins-using-client-side-rendering). - Community Sites use asynchronous events to update objects. If asynchronous events run in the background, you may encounter *Save* conflicts when you attempt to update lists or list items, and your handle to the object may become stale. From a484f3ebe8f2739c43962c3bc1bba734d82e7f17 Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Tue, 16 Jun 2026 14:00:15 +0530 Subject: [PATCH 05/10] Update article to specify Classic SharePoint applicability and links --- .../modify-sharepoint-components-for-mds.md | 149 ++++-------------- 1 file changed, 27 insertions(+), 122 deletions(-) diff --git a/docs/general-development/modify-sharepoint-components-for-mds.md b/docs/general-development/modify-sharepoint-components-for-mds.md index 42dff178e3..8f75bc5c29 100644 --- a/docs/general-development/modify-sharepoint-components-for-mds.md +++ b/docs/general-development/modify-sharepoint-components-for-mds.md @@ -6,68 +6,41 @@ ms.assetid: c967be7c-f29f-481a-9ce2-915ead315dcd ms.localizationpriority: medium --- - # Modify SharePoint components for MDS + +> [!IMPORTANT] +> This article applies only to **Classic SharePoint (SharePoint Server 2013/2016/2019 Classic Experience)**. +> It is **not applicable to SharePoint Online Modern experiences**, where Minimal Download Strategy (MDS), master pages, and server-side page rendering customization are not used. +> +> Modern SharePoint development uses the **SharePoint Framework (SPFx)** instead of MDS-based page optimization techniques. + Learn how to modify the components in your SharePoint project to take advantage of Minimal Download Strategy (MDS) in SharePoint. Minimal Download Strategy (MDS) improves the user experience by returning from the server only the portions of a page required to render it properly in the browser. Because the fully-rendered page is not returned to the client, the server must be able to accurately identify the portions that are required to render the page. You might need to modify the components in your SharePoint project so that they are identified as MDS-compliant and can work with the MDS engine. Learn more about MDS in [Minimal Download Strategy overview](minimal-download-strategy-overview.md). - - - - ## Why modify SharePoint components? As explained in [Minimal Download Strategy overview](minimal-download-strategy-overview.md), SharePoint controls work whether or not you modify them to take full advantage of MDS. However, when your components are not MDS compliant, the MDS engine issues a failover. In a failover, the MDS engine takes an extra round trip to redirect the browser to the full version of the new page, which takes time. Users have the best experience when you modify components to work with MDS and avoid a failover every time they browse to a new page in SharePoint. You usually need to modify master pages, ASP.NET pages, controls, and web parts. - - - - - - - - + ## Master pages -The master page provides a template that lets MDS identify the content regions that may need to be updated when someone navigates to a new page. Optimizing your master pages is one of the most important steps to take when optimizing performance because master pages identify sections that require updated content.. The Seattle.master master page included with SharePoint is a good example of an optimized master page. Figure 1 shows examples of components in the Seattle.master master page that change from page to page, such as the (1) main content area, (2) left navigation bar, and (3) page title. - - - - +The master page provides a template that lets MDS identify the content regions that may need to be updated when someone navigates to a new page. Optimizing your master pages is one of the most important steps to take when optimizing performance because master pages identify sections that require updated content. The Seattle.master page included with SharePoint is a good example of an optimized master page. Figure 1 shows examples of components in the Seattle.master master page that change from page to page, such as the (1) main content area, (2) left navigation bar, and (3) page title. + **Figure 1. Components that require updates in a master page** ![Components that require updates in master page](../images/MDS_SeattleMaster.png) > [!NOTE] > There are many more components in the Seattle.master master page that change from page to page, such as style sheets and JavaScript files. Figure 1 shows only a few examples. - - - There are different patterns to optimize the components in a master page. You can use a pattern for the following components: - - - - - HTML regions and controls - - - Style sheets - - - JavaScript files - - - Page title - HTML regions and controls are MDS compatible if they are wrapped in **SharePoint:AjaxDelta** tags. By wrapping the content in **SharePoint:AjaxDelta** tags, you are signaling that the MDS engine should update the enclosed controls and HTML. If a control or HTML section doesn't change from page to page, it should not be sent to the client. Therefore, you should keep these controls outside of **AjaxDelta** tags. In the Seattle.master master page shown in Figure 1, the (1) main content area is wrapped in **AjaxDelta** tags, as shown here. - - - - - ```csharp @@ -127,12 +88,7 @@ The last example in Figure 1 is the (3) page title, which requires a special pat ``` Your master page can also include style sheets and JavaScript files. The server engine needs to identify both CSS and JavaScript files as required. To identify the CSS files resources as required, use the following pattern. - - - - - - + ```csharp @@ -140,11 +96,6 @@ Your master page can also include style sheets and JavaScript files. The server ``` Note that you can have only one **CssLink** tag per master page, but you can have many **CssRegistration** tags, so you can add many CSS files. Use the following pattern for JavaScript files. - - - - - ```csharp @@ -152,64 +103,33 @@ Note that you can have only one **CssLink** tag per master page, but you can hav ``` Including CSS and JavaScript files using HTML **style** and **script** tags is not supported in MDS. - - - - + ## ASP.NET pages -If your project includes ASP.NET pages, you probably need to reference CSS and JavaScript files. The HTML **style** and **script** tags are not compatible with MDS. Instead, use the **CssRegistration** and **ScriptLink** patterns explained in the previous section. - - - -Your ASP.NET pages may also use the **Response.Output** method to write content to the page, which is not allowed in MDS. Instead, you can use the following MDS-compliant methods of the [SPHttpUtility](https://msdn.microsoft.com/library/Microsoft.SharePoint.Utilities.SPHttpUtility.aspx) class: - - - - -- [WriteNoEncode()](https://msdn.microsoft.com/library/Microsoft.SharePoint.Utilities.SPHttpUtility.WriteNoEncode.aspx) - - -- [WriteHtmlEncode()](https://msdn.microsoft.com/library/Microsoft.SharePoint.Utilities.SPHttpUtility.WriteHtmlEncode.aspx) - - -- [WriteEcmaScriptStringLiteralEncode()](https://msdn.microsoft.com/library/Microsoft.SharePoint.Utilities.SPHttpUtility.WriteEcmaScriptStringLiteralEncode.aspx) - - -- [WriteHtmlEncodeAllowSimpleTextFormatting()](https://msdn.microsoft.com/library/Microsoft.SharePoint.Utilities.SPHttpUtility.WriteHtmlEncodeAllowSimpleTextFormatting.aspx) - - -- [WriteHtmlUrlAttributeEncode()](https://msdn.microsoft.com/library/Microsoft.SharePoint.Utilities.SPHttpUtility.WriteHtmlUrlAttributeEncode.aspx) - - -- [WriteUrlKeyValueEncode()](https://msdn.microsoft.com/library/Microsoft.SharePoint.Utilities.SPHttpUtility.WriteUrlKeyValueEncode.aspx) +If your project includes ASP.NET pages, you probably need to reference CSS and JavaScript files. The HTML **style** and **script** tags are not compatible with MDS. Instead, use the **CssRegistration** and **ScriptLink** patterns explained in the previous section. - -- [WriteUrlPathEncode()](https://msdn.microsoft.com/library/Microsoft.SharePoint.Utilities.SPHttpUtility.WriteUrlPathEncode.aspx) +Your ASP.NET pages may also use the **Response.Output** method to write content to the page, which is not allowed in MDS. Instead, you can use the following MDS-compliant methods of the [SPHttpUtility](/previous-versions/office/sharepoint-server/ms450378(v=office.15)) class: +- [WriteNoEncode()](/previous-versions/office/sharepoint-server/jj169369(v=office.15)) +- [WriteHtmlEncode()](/previous-versions/office/sharepoint-server/jj170139(v=office.15)) +- [WriteEcmaScriptStringLiteralEncode()](/previous-versions/office/sharepoint-server/jj167256(v=office.15)) +- [WriteHtmlEncodeAllowSimpleTextFormatting()](/previous-versions/office/sharepoint-server/jj173975(v=office.15)) +- [WriteHtmlUrlAttributeEncode()](/previous-versions/office/sharepoint-server/jj173901(v=office.15)) +- [WriteUrlKeyValueEncode()](/previous-versions/office/sharepoint-server/jj175497(v=office.15)) +- [WriteUrlPathEncode()](/previous-versions/office/sharepoint-server/jj171467(v=office.15)) - Besides referencing JavaScript files, your ASP.NET pages can have inline JavaScript code. Use the following pattern to make your script blocks MDS compatible. - - - - - - + ```csharp // Your JavaScript code here. ``` - ## Controls and web parts You also need to mark your controls and web parts as MDS compliant. The following code shows the pattern to use. - - - ```csharp @@ -219,32 +139,17 @@ namespace VisualWebPartProject2.VisualWebPart1 // Rest of your control logic ``` -Also, your controls and web parts need to register their resources using the methods in the [SPPageContentManager](https://msdn.microsoft.com/library/Microsoft.SharePoint.WebControls.SPPageContentManager.aspx) class. The most common resources are JavaScript snippets and hidden files, which can be registered using the **RegisterClientScriptBlock** and **RegisterHiddenField**, respectively. - - +Also, your controls and web parts need to register their resources using the methods in the [SPPageContentManager](/previous-versions/office/sharepoint-server/jj168784(v=office.15)) class. The most common resources are JavaScript snippets and hidden files, which can be registered using the **RegisterClientScriptBlock** and **RegisterHiddenField**, respectively. Your controls and web parts can also use XSLT files to control the rendering process. Your XSLT files can have embedded JavaScript code or files. The MDS engine needs to know about these resources. You can register the JavaScript resources using an XSLT extension object named **pcm**. A great example of how to use the **pcm** object is in the %ProgramFiles%\\Common Files\\Microsoft Shared\\web server extensions\\15\\TEMPLATE\\LAYOUTS\\XSL\\fldtypes.xsl file. The following code shows how the **fldtypes.xsl** file uses the **pcm** object to register JavaScript resources. - - - - - - + ```XML ``` - ## See also - - -- [Minimal Download Strategy overview](minimal-download-strategy-overview.md) - - +- [Minimal Download Strategy overview](minimal-download-strategy-overview.md) - [Build sites for SharePoint](build-sites-for-sharepoint.md) - - - From 89657dfda3d9debb49ec371aa9567f779c6eb134 Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Tue, 16 Jun 2026 17:37:09 +0530 Subject: [PATCH 06/10] Add legacy guidance to UDF security permissions article --- ...ct-udf-code-access-security-permissions.md | 85 +++---------------- 1 file changed, 13 insertions(+), 72 deletions(-) diff --git a/docs/general-development/how-to-restrict-udf-code-access-security-permissions.md b/docs/general-development/how-to-restrict-udf-code-access-security-permissions.md index ccadfd1ac6..83495c5ad2 100644 --- a/docs/general-development/how-to-restrict-udf-code-access-security-permissions.md +++ b/docs/general-development/how-to-restrict-udf-code-access-security-permissions.md @@ -12,16 +12,17 @@ ms.localizationpriority: medium # Restrict UDF code access security permissions -If you do not want a particular user-defined function (UDF) assembly to run with full trust, you must explicitly restrict code access security permissions for it. You can configure code groups and restrict permissions by using the .NET Framework 2.0 Configuration tool. - - - +> **Legacy guidance notice** +> +> This article applies only to legacy environments using **SharePoint Server 2010/2013 Excel Services** and **.NET Framework 2.0–3.5 Code Access Security (CAS)**. +> CAS, code groups, and the .NET Framework Configuration tool are **deprecated and not supported in .NET Framework 4+ or modern SharePoint/Excel platforms**. +> +> For modern solutions, use service-level security, APIs, and OS/network isolation instead of assembly-level permission configuration. + +If you do not want a particular user-defined function (UDF) assembly to run with full trust, you must explicitly restrict code access security permissions for it. You can configure code groups and restrict permissions by using the .NET Framework 2.0 Configuration tool. For example, imagine a scenario where you have a UDF assembly that contains multiple methods. One of the UDF methods performs a custom calculation, and another UDF method in the same assembly calls a Web service to obtain stock quotes. Because your users only use Excel workbooks that call the first (calculation) method, you might want to disable the assembly from having Web access, for increased security. -You have the UDF assembly installed in a folder on the server at C:\\UdfAssemblies\\CalcAndWebAccessUdf.dll. Because the assembly is on the same computer as Microsoft SharePoint Server 2010, when Excel Calculation Services loads the UDF assembly, it is loaded in the MyComputer zone. By default, the MyComputer zone is fully trusted. This means that the UDF assembly is granted full trust permission. - - - +You have the UDF assembly installed in a folder on the server at C:\\UdfAssemblies\\CalcAndWebAccessUdf.dll. Because the assembly is on the same computer as Microsoft SharePoint Server 2010, when Excel Calculation Services loads the UDF assembly, it is loaded in the MyComputer zone. By default, the MyComputer zone is fully trusted. This means that the UDF assembly is granted full trust permission. To lock down the UDF assembly so that it cannot have Web access, you must explicitly restrict the permission set that it is granted by following these steps: 1. Create a new URL-based code group under My_Computer_Zone at the Machine level. Scope the code group to that specific assembly and create a custom permission set. @@ -29,98 +30,38 @@ To lock down the UDF assembly so that it cannot have Web access, you must explic 2. Configure the custom code group properties so that your policy level has only the permissions from the permission set that is associated with the custom code group. When Excel Calculation Services loads a UDF assembly that resides on the same computer, the assembly is loaded in the MyComputer zone. This means that by default, the UDF assembly is granted full trust. When the custom permission set intersects with the full trust permission set, the result is full trust. To make it so that the a policy has only the permission from the permission set that is associated with your custom code group, you must enable the **This policy level will only have the permissions from the permission set associated with this code group** property. - -For more information about configuring code groups, see the following articles on MSDN: -- [Configuring Code Groups Using the .NET Framework Configuration Tool](https://msdn.microsoft.com/library/default.asp?url=/library/cpguide/html/cpconUsingNETConfigurationToolToWorkWithCodeGroups.asp?frame=true) (https://msdn.microsoft.com/library/default.asp?url=/library/cpguide/html/cpconUsingNETConfigurationToolToWorkWithCodeGroups.asp?frame=true) - - -- [Code Access Security in Practice](https://msdn.microsoft.com/library/default.asp?url=/library/dnnetsec/html/thcmch08.asp) (https://msdn.microsoft.com/library/default.asp?url=/library/dnnetsec/html/thcmch08.asp) - - - ### To create a new code group - -1. Click **Start**, point to **All Programs**, point to **Administrative Tools**, and then click **Microsoft .NET Framework 2.0 Configuration**. - +1. Click **Start**, point to **All Programs**, point to **Administrative Tools**, and then click **Microsoft .NET Framework 2.0 Configuration**. This starts the **.NET 2.0 Framework Configuration** tool. - - -2. In the left pane, expand the **My Computer** node, and then expand the **Runtime Security Policy** node. - - +2. In the left pane, expand the **My Computer** node, and then expand the **Runtime Security Policy** node. 3. Expand the **Machine** node. - - 4. Expand the **Code Groups** node. - - 5. Expand the **All_Code** node. - - 6. Expand the **My_Computer_Zone** node.Right-click **My_Computer_Zone** and then select **New** to display the **Identify the new Code Group** dialog box. - - 7. Select **Create a new code group**. - - 8. In the **Name** field, type a name for the new code group, for example,RestrictWebAccessUdf. - - 9. Click **Next**. - - 10. To scope the code group to your specific UDF assembly, select **URL** from the **Choose the condition type for this code group**. - This displays the **URL** field. - - 11. In the **URL** field, type the path to the UDF assembly for which you want to restrict access to the Web, for example,C:\\UdfAssemblies\\CalcAndWebAccessUdf.dll. - - 12. Click **Next**. - - 13. Select **Create a new permission set**, and then click **Next**. - - 14. In the **Name** field, type a name for your permission set, for example,AssemblyExecutionCustomPermissionSet. - - 15. Click **Next**. - - -16. To give your UDF assembly "assembly execution" permission, select **Security** from the **Assembly Permissions** list, and then click **Add**. - +16. To give your UDF assembly "assembly execution" permission, select **Security** from the **Assembly Permissions** list, and then click **Add**. This displays the **Permission Settings** dialog box. - - 17. Select **assemblies the following security permissions**. - - 18. Select **Enable assembly execution**. - - 19. Click **OK**, and then click **Next**. - - 20. Click **Finish**. - You should see your new custom code group under the **My_Computer_Zone** node (in this example, **RestrictWebAccessUdf**). - - ### To make sure that the permission sets are executed - 1. Under the **My_Computer_Zone** node, right-click the new custom code group (in this example, **RestrictWebAccessUdf**), and then select **Properties**. - - -2. On the **General** tab, select the **This policy level will only have the permissions from the permission set associated with this code group** check box. - - +2. On the **General** tab, select the **This policy level will only have the permissions from the permission set associated with this code group** check box. 3. Click **Apply**, and then click **OK**. - > [!NOTE] > If the UDF method throws an exception because it cannot make the Web service call, you should receive a **#VALUE!** error in the Excel formula that called the UDF. From ffb3a92b9e079e5e4dd5e754b81c847d84ee1d65 Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Wed, 17 Jun 2026 10:08:13 +0530 Subject: [PATCH 07/10] Fix link format in user segmentation documentation --- docs/general-development/user-segmentation-in-sharepoint.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/general-development/user-segmentation-in-sharepoint.md b/docs/general-development/user-segmentation-in-sharepoint.md index da74ac91f9..7ab92a5722 100644 --- a/docs/general-development/user-segmentation-in-sharepoint.md +++ b/docs/general-development/user-segmentation-in-sharepoint.md @@ -29,7 +29,7 @@ Before you get started implementing user segmentation in SharePoint, be sure to - SharePoint - Visual Studio 2012 -This article assumes that you have experience with developing web parts in SharePoint. For more information on developing web parts, refer to [Building Block: web parts](previous-versions/office/developer/sharepoint-2010/ee535520(v=office.14)). +This article assumes that you have experience with developing web parts in SharePoint. For more information on developing web parts, refer to [Building Block: web parts](/previous-versions/office/developer/sharepoint-2010/ee535520(v=office.14)). ## Overview on adding user segmentation functionality to your SharePoint site From 68a05dbca16fdf17e798a952404c6a0ceb93b5dd Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Wed, 17 Jun 2026 10:17:40 +0530 Subject: [PATCH 08/10] fixed link --- .../information-management-policy-sharepoint-add-in.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/solution-guidance/information-management-policy-sharepoint-add-in.md b/docs/solution-guidance/information-management-policy-sharepoint-add-in.md index 75d9bc1bc5..ddf13bb388 100644 --- a/docs/solution-guidance/information-management-policy-sharepoint-add-in.md +++ b/docs/solution-guidance/information-management-policy-sharepoint-add-in.md @@ -35,7 +35,7 @@ The following O365 PnP Code Sample and video demonstrates how to manage and appl ## Related links -- [Office 365 development and SharePoint PnP solution guidance](https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/office-365-development-patterns-and-practices-solution-guidance) +- [Office 365 development and SharePoint PnP solution guidance](/sharepoint/dev/solution-guidance/office-365-development-patterns-and-practices-solution-guidance) ## PnP samples From 1a4257c77a21df02c6141c04fc1ff363e82e13a1 Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Wed, 17 Jun 2026 10:22:35 +0530 Subject: [PATCH 09/10] removed invalid technet link --- ...s-in-social-and-collaboration-features-in-sharepoint-201.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/general-development/what-s-new-for-developers-in-social-and-collaboration-features-in-sharepoint-201.md b/docs/general-development/what-s-new-for-developers-in-social-and-collaboration-features-in-sharepoint-201.md index 613e1f1cae..e86fa0e56a 100644 --- a/docs/general-development/what-s-new-for-developers-in-social-and-collaboration-features-in-sharepoint-201.md +++ b/docs/general-development/what-s-new-for-developers-in-social-and-collaboration-features-in-sharepoint-201.md @@ -11,7 +11,8 @@ ms.localizationpriority: medium Learn about new and changed social and collaboration features for My Site and Community Site development scenarios in SharePoint. Social and collaboration features in SharePoint make it easy for users to communicate and to stay engaged and informed. The improved social feed on personal sites and team sites helps users to keep up-to-date with the people and content that they care about. The new Community Site feature provides a rich community experience that lets users easily find and share information and find people who have similar interests. -For an in-depth overview of the new social and collaboration features in SharePoint, see [What's new in social computing in SharePoint](https://technet.microsoft.com/library/jj219766%28v=office.15%29) on TechNet. For more information about programming with social and collaboration features, see [Social and collaboration features in SharePoint](social-and-collaboration-features-in-sharepoint.md). +For more information about programming with social and collaboration features, see [Social and collaboration features in SharePoint](social-and-collaboration-features-in-sharepoint.md). + ## New and changed My Site features in SharePoint From 6cce1701aa45b2866c3e9cb7b1689585df23fc57 Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Wed, 17 Jun 2026 10:45:19 +0530 Subject: [PATCH 10/10] fixed technet link --- ...ollaboration-features-in-sharepoint-201.md | 100 ++---------------- 1 file changed, 11 insertions(+), 89 deletions(-) diff --git a/docs/general-development/what-s-new-for-developers-in-social-and-collaboration-features-in-sharepoint-201.md b/docs/general-development/what-s-new-for-developers-in-social-and-collaboration-features-in-sharepoint-201.md index e86fa0e56a..2db126bba7 100644 --- a/docs/general-development/what-s-new-for-developers-in-social-and-collaboration-features-in-sharepoint-201.md +++ b/docs/general-development/what-s-new-for-developers-in-social-and-collaboration-features-in-sharepoint-201.md @@ -17,13 +17,8 @@ For more information about programming with social and collaboration features, s The My Site Social API, which includes user profiles and social data, contains many new and changed features. New functionality for My Sites and team sites provides an interactive, conversational experience within feeds that makes it easier for users to stay connected to the people and content that matter to them. - - - + The **Newsfeed** page on SharePoint displays several of these improvements, including a text box that enables users to quickly publish microblog posts and an interactive, conversational feed of posts and updates from the people and content that the user is following. - - - ### New Social namespace provides APIs for social feeds and following people and content @@ -32,42 +27,24 @@ The **Social** namespace contains the primary API for working with feeds and mic > [!NOTE] > The API in the [Microsoft.Office.Server.ActivityFeed](/previous-versions/office/sharepoint-server/ee584594(v=office.15)) namespace is deprecated. See [Deprecated and removed My Site Social API and features](#bkmk_DeprecatedAPI). - - - - ### New client APIs for social feeds, following people and content, and user properties in SharePoint SharePoint includes new client APIs that you can use to work with social feeds, follow people and content, and retrieve user properties in online, on-premises, and mobile development. When possible, you should use client APIs for SharePoint development instead of using the server object model or web services. Client APIs include managed client object models, a JavaScript object model, and a Representational State Transfer (REST) service. If you are developing a SharePoint Add-in, you must use a client API. - - Not all server-side functionality in the Microsoft.Office.Server.UserProfiles assembly is available from client APIs. For example, there's no client-side access to the API in the [Microsoft.Office.Server.Audience](/previous-versions/office/sharepoint-server/ms559937(v=office.15)) namespace, the [Microsoft.Office.Server.ReputationModel](/previous-versions/office/sharepoint-server/jj884389(v=office.15)) namespace, or the [Microsoft.Office.Server.SocialData](/previous-versions/office/sharepoint-server/ee579636(v=office.15)) namespace. To see which APIs are available, see the [Microsoft.SharePoint.Client.Social](/previous-versions/office/sharepoint-csom/jj164417(v=office.15)) namespace and the [Microsoft.SharePoint.Client.UserProfiles](/previous-versions/office/sharepoint-csom/jj163481(v=office.15)) namespace. - - For information about how to access the My Site Social client APIs, see [Get started developing with social features in SharePoint](get-started-developing-with-social-features-in-sharepoint.md). For more information about the API sets in SharePoint and when to use them, see [Choose the right API set in SharePoint](choose-the-right-api-set-in-sharepoint.md). - - ### Use the ProfileLoader.CreatePersonalSiteEnqueueBulk method to provision personal sites and OneDrive for Business for multiple users (My Site Host administrators on SharePoint Online only) My Site Host administrators can use the **ProfileLoader.CreatePersonalSiteEnqueueBulk** method to programmatically provision personal sites for multiple users on SharePoint Online, which include features such as OneDrive for Business and the Sites page. - - - + The following code example uses the .NET client object model in a console application. Before you run the example, add references to Microsoft.SharePoint.Client.dll, Microsoft.SharePoint.Client.Runtime.dll and Microsoft.SharePoint.Client.UserProfiles.dll, and change the placeholder values for the **userName**, **passwordStr**, and **serverUrl** variables. The **serverUrl** variable must be the URL of the SharePoint Online Administration Center. > [!NOTE] > To get the required client DLLs, download the [SharePoint Online Client Components SDK](https://www.microsoft.com/download/details.aspx?id=42038). - - - - - - ```csharp @@ -120,11 +97,6 @@ namespace CreatePersonalSiteBulkConsole To use the **CreatePersonalSiteEnqueueBulk** method with Windows PowerShell, first change the placeholder values (the URL of the SharePoint Online Administration Center and user names) in the following commands, and then run the commands in the SharePoint Management Shell. - - - - - ``` $webUrl = "https://yoursharepointadmin.sharepoint.com" @@ -151,59 +123,35 @@ $profile #To enqueue profile $loader.CreatePersonalSiteEnqueueBulk(@("user1@domain.com")) $loader.Context.ExecuteQuery() -``` - -For more information, see [Use Windows PowerShell to administer SharePoint](https://technet.microsoft.com/library/ee806878%28v=office.15%29.aspx). - - - +``` ### New objects for users and user properties in SharePoint SharePoint includes new objects that represent users and user properties: - - - - + - The [SocialActor](/previous-versions/office/sharepoint-csom/jj164459(v=office.15)) object represents users (and other entities) for feed and following activities. - - - The [PersonProperties](/previous-versions/office/sharepoint-csom/jj164752(v=office.15)) object contains general user properties and user profile properties. > [!NOTE] > Server object model versions are the [SPSocialActor](/previous-versions/office/sharepoint-server/jj275459(v=office.15)) object and the [PersonProperties](/previous-versions/office/sharepoint-server/jj274629(v=office.15)) object. - - - - + SharePoint also includes a new client-side [UserProfile](/previous-versions/office/sharepoint-csom/jj164616(v=office.15)) object that provides methods you can use to create a personal site for the current user. However, it does not contain all the user properties that the server-side [UserProfile](/previous-versions/office/sharepoint-server/ms566874(v=office.15)) object contains. To access all user properties from client-side code, use the [PeopleManager.GetMyProperties](/previous-versions/office/sharepoint-csom/jj164086(v=office.15)) method or [PeopleManager.GetPropertiesFor](/previous-versions/office/sharepoint-csom/jj163877(v=office.15)) method (user profile properties are stored in the [PersonProperties.UserProfileProperties](/previous-versions/office/sharepoint-csom/jj163311(v=office.15)) property) or use the [PeopleManager.GetUserProfilePropertiesFor](/previous-versions/office/sharepoint-csom/jj164532(v=office.15)) method or [PeopleManager.GetUserProfilePropertyFor](/previous-versions/office/sharepoint-csom/jj164288(v=office.15)) method. - - - - + ### New client-side people picker control The client-side People Picker control is an HTML and JavaScript control that provides cross-browser support for selecting people, groups, and claims. You can configure the picker with the same settings as the server-side version of the control, including control-specific properties (like allowing multiple users or users and groups) and web application-level configuration settings (like Active Directory Domain Services parameters or targeting particular forests). For more information, see [Use the client-side People Picker control in SharePoint-hosted SharePoint Add-ins](/sharepoint/dev/sp-add-ins/use-the-client-side-people-picker-control-in-sharepoint-hosted-sharepoint-add-in). - - - ### Deprecated and removed My Site Social API and features The following My Site Social API and features are deprecated in SharePoint: - - - - + - The API in the [Microsoft.Office.Server.ActivityFeed](/previous-versions/office/sharepoint-server/ee584594(v=office.15)) namespace is deprecated. The **Social** namespace provides the API for programmatically working with social feeds in SharePoint. For backward compatibility, **ActivityEvent** items from SharePoint 2010 are displayed in SharePoint feeds as events that cannot be replied to. (Legacy event migration must be enabled in Central Administration.) - - The My Site RSS feed (ActivityFeed.aspx) is replaced with new APIs in the REST service, the client object model, and the JavaScript object model. To migrate custom SharePoint 2010 code that uses this API (preferably a client API), replace all requests to ActivityFeed.aspx with calls to the new API and handle feed data that is returned in JavaScript Object Notation (JSON) format. - - The **Recent Activities** web part is replaced with a new **Newsfeed** web part that supports multithreaded conversations and dynamic feed retrieval. > [!NOTE] @@ -211,54 +159,35 @@ The following My Site Social API and features are deprecated in SharePoint: - The **Social Comments** web part is deprecated. - - The following activity events no longer automatically inform the feed: profile update, upcoming birthday, upcoming workplace anniversary, new membership, and change of manager. However, you can create custom event receivers for these activities. No new social events have been added. - - The following fields in the [Privacy](/previous-versions/office/sharepoint-server/ms518310(v=office.15)) enumeration are deprecated: **Contacts**, **Organization**, and **Manager**. SharePoint offers only **Private** ( **Only Me**) and **Public** ( **Everyone**) privacy settings. Existing privacy settings are retained until they are changed by the user. To migrate custom SharePoint 2010 code that uses this API, replace all references to the deprecated privacy fields. - - The **Following People** API that is accessed from the **SocialFollowingManager** replaces the **Colleagues** functionality from SharePoint Server 2010. The **Colleagues** page is replaced with the **People I'm following** page. The **Groups** feature that enabled users to organize colleagues into groups is no longer available. - - Organization profiles are obsolete in SharePoint, and the following types are deprecated: **OrganizationProfile**, **OrganizationProfileManager**, **OrganizationMembershipType**, **OrganizationNotFoundException**, **OrganizationProfileChange**, **OrganizationProfileChangeQuery**, **OrganizationProfileMembershipChange**, and **OrganizationProfileValueCollection**. - - The **My Links** feature is deprecated in SharePoint. - - ## New Community Site feature in SharePoint The new Community Site feature includes a new site template and improved discussion experience. Features such as reputation, categories, featured discussions, a question-post type, and best replies let community members easily find popular discussions, relevant information, and people with similar interests. Members build reputation as they participate in communities. - - The Community Site feature does not expose a specific API for development. To extend Community Site features, you use SharePoint site and list APIs directly. For example, you can use SharePoint APIs to customize the site and list templates, create custom activities from communities for the social feed, integrate reputation information into search results, customize the reputation model, or create workflows to moderate discussions. - - - + The following list contains information for developing with Community Site features: - - - - Community Sites use the **Community** site template ( [Id](/previous-versions/office/sharepoint-server/ee544844(v=office.15)) = **62**). The site template is not available for public websites. The template type of the discussion board list is [DiscussionBoard](/previous-versions/office/sharepoint-server/ee541191(v=office.15)) (value = **108**). - - Activating the **Community Site** feature activates the **CommunityEventReceiver** event receiver. - - + - To customize the client-side rendered list view, you must use JavaScript overrides to replace the view. List views cannot be extended through the SharePoint API. For more information, see [Customize a list view in SharePoint Add-ins using client-side rendering](/sharepoint/dev/sp-add-ins/customize-a-list-view-in-sharepoint-add-ins-using-client-side-rendering). - - + - Community Sites use asynchronous events to update objects. If asynchronous events run in the background, you may encounter *Save* conflicts when you attempt to update lists or list items, and your handle to the object may become stale. As a workaround, handle exceptions that are returned by **Update** calls, refresh the instance before you retry the call, and loop for multiple retries, as shown in the following code example. - - - + ```csharp int retries = 1; @@ -281,15 +210,8 @@ while (retries <= 10) ``` - ## See also - - [Social and collaboration features in SharePoint](social-and-collaboration-features-in-sharepoint.md) - - [Get started developing with social features in SharePoint](get-started-developing-with-social-features-in-sharepoint.md) - -- [What's new in social computing in SharePoint](https://technet.microsoft.com/library/jj219766%28v=office.15%29) - -