Introduction
Hi guys, today we are trying to implement security trimming, which is not included in the Modern Sites as available in the Classic Sites. In Classic sites, a simple Enable option of the Security Trimming to the <Site Collection Url>_layouts/15/SiteNavigationSettings.aspx leads the Audience Targeting for all the various Site links available on that Site Collection. However it’s not getting reflected on Modern SharePoint. Even after using SPFx customizations it’s a failure. Therefore, I am showing you a trick to make it available on the Modern Team Spaces Hub, which has subsites created with a specific process in order to establish Security Trimming as well as a Hub associated inheritance to those subsites of the given Modern Team Site Collection, which is registered as a Hub site using the Modern Admin Centre.
Steps
1. Go to My Team Spaces Hub URL.
2. Go to Site Contents and click to create a subsite.
3. Use the below options while creating the subsites and click the create button.
This is to implement Security Trimming.
Using Unique permissions for achieving Security Trimming for different subsites with different Targeted Audiences.
4. Add users according to your permission management plan.
We have 3 Groups Visitors-Read, Member-Contribute, and Owners-Full Control permissions.
5. Make any quick URL, Title, Description, Logo Image Updation using the
Site Settings>> Title, Description & Logo for the given Subsite URL.
6. Similarly, follow the above steps for the rest of the Subsites.
7. Edit links in the My Team Spaces 2nd level Navigation and add all the Links with their respective Subsite labels as shown below. Custom Sorting can also be achieved by using the Meta Data Management which is under Term Store Management under Site Settings.
Conclusion
MyTeamSpaces with all the security-trimmed subsites have been created along with the MyTeamSpaces Hub site’s inherited properties, including Theme, Logo, Global Navigation on the Top, etc. are readily reflected across all the team subsites, saving a lot of time in the modern environment.