List View Threshold with On-Premises Environments Troubleshooting- Resolved

Our team has been working on converting legacy SharePoint applications written in server side code to client side code on a newer version of SharePoint. The old environment lifted the List View Threshold to a non-default range, which the new environment did not have/support. Our goal was to have these applications respect the list view threshold. However, in our Dev/INT environments, we could not figure out why we were not seeing the list view threshold. Turns out, the list view threshold is NOT enforced if you are a LOCAL ADMINISTRATOR on the WFE server.

local admins

Any user in the local administrators group will not have the list view threshold enforced. When we used test user accounts, they were getting the threshold error as expected since they were not a developer’s user account in the local admins group. Simly remove the user from local administrators and they will get the threshold error immediately if it shows for regular users.

Threshold Tips

  1. Index Columns
    1. Up to 20 per list
    2. Do this before you get 5,000 items in your list, or you cannot dynamically change them (unless you are in SPO, I hear they are raising it to 20,000 and allowing you to set indexes when you have items above that, but we will see once its out if its not already)
    3. Index anything you want to filter, group or sort by, including OOTB columns such as Created/Modified, etc.
  2. Remove or Fix your existing Sorting/Filter/Grouping on views
    1. The rule we follow is: Remove all filters. Add your first indexed filter that should return LESS than 5,000 items, or the view wont work. Have over 5,000 items? well, sorry, but find another filter (or use the All Items view, read on)
    2. Your second and subsequent filters can further narrow down from 5,000 by using AND to join filters, but beware of OR since it immediately negates your first filter, giving you the threshold if that column is not indexed and returns less than 5,000 items. We have also noticed swapping the order in complex filters seems to magically work and we cannot explain it. So if you have 2 filters then an OR and 2 more filters, try reversing the order of the last #3 and #4 columns if you get the threshold error.
  3. All Items view is your friend
    1. Ever wonder why OOTB All items shows fine? Well its because if you leave it without Fitlers/Sorting/Grouping it will work and can query over 5,000 items (with paging of course). Microsoft left this view for some magic. And if you ask MS Support, they wont explain it other than share the magic.
  4. 5,000 folder limit
    1. This one is our most recent issue, you cannot return more than 5,000 folders in any view, including All Items view. To fix this, apply some type of query to return less than 5,000 folders, OR disable showing items in folders (Show the items without folders and it will work).

 

So, if you watch out for who you have in local administrators, and follow these 4 rules, you can probably get your views to work (somewhat). However, if you are that person who needs more than 5,000 items on your query returned, try exporting the magical All Items view to Excel or design a custom export solution, or use a 3rd party tool such as Power BI or Tableau to query the list.

SharePoint Online- Create a new Home Site in an existing tenant. Spoiler- its not available yet.

This week at #MSIgnite, there has been a lot of talk about Home Sites. This was released a few months back as a PowerShell command to transform any modern communication site collection into the O365 SharePoint Online landing page for your organization.

More can be read here: https://techcommunity.microsoft.com/t5/Microsoft-SharePoint-Blog/SharePoint-home-sites-a-landing-for-your-organization-on-the/ba-p/621933

SharePoint home sites are the landing sites for your organization that bring together news, events, content, conversations and video to deliver an engaging experience that reflects your voice, your priorities, and your brand.  Home sites are built on top of familiar communication sites.

UPDATE- SPO Home Sites is not available to the public yet, even on first release tenants. I will update this post once its released. See error command at last step in this post.

1- Create the site

Create a Modern Communication Site Collection that will be your hubsite, if you do not have one already.

1- create new communication site

Give the new site a name, I choose topic and Home Site:

2- new communication site title and url

2- Share the site with users

I shared with everyone except external users

3- share new communication site

3- Set the new site collection as the home site

I am hoping this does a bunch of magic to make it look like the Look Book’s rollup.

Enter the URL of your newly created site collection in the URL below:

Set-SPOHomeSite -HomeSiteUrl https://yourtenant.sharepoint.com/sites/HomeSite

andddd error!

Set-SPOHomeSite : The requested operation is part of an experimental feature that is not supported in the current
environment.

4- set-spohomesite error experimental feature not supported

Wow, that was unexpected.

I have not seen a release date yet, but wanted to post this in hopes it will save someone else the time of creating a site.

Update as of 7/3/2020-

Using 16.0.20212.12000 of SPO Management shell- slightly different error:

 

PS C:\WINDOWS\System32> Connect-SPOService

cmdlet Connect-SPOService at command pipeline position 1
Supply values for the following parameters:
Url: https://m365xIDHERE-admin.sharepoint.com/
PS C:\WINDOWS\System32> Set-SPOHubSite

cmdlet Set-SPOHubSite at command pipeline position 1
Supply values for the following parameters:
Identity: https://m365xIDHERE.sharepoint.com/sites/Eric-PublicTeam
Set-SPOHubSite : Cannot invoke method or retrieve property from null object. Object returned by the following call
stack is null. “GetHubSitePropertiesByUrl

At line:1 char:1
+ Set-SPOHubSite
+ ~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-SPOHubSite], ServerException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.SetSP
OHubSite

PS C:\WINDOWS\System32> Get-SPOHubSite
PS C:\WINDOWS\System32>

Cannot invoke method or retrieve property from null object. Object returned by the following call stack is null. "GetHubSitePropertiesByUrl"