In SharePoint Online, Under Site Settings --> Navigation there is a setting called "Maximum number of dynamic items to show".

It is by default 20 and cannot be inherited from the parent site.

I need the value to be set to 0 using CSOM during site creation.

How do I do this?

I have used code like this:

newSubsite.AllProperties["__InheritCurrentNavigation"] = "True";

To select the "Current Navigation --> Display the same navigation items as the parent site" option.

I found this key by examining the collection in the debugger.

But there is no key that seems to relate to "Maximum number of dynamic items to show".

1 Answer 1


The correct property bag key for that is __CurrentDynamicChildLimit. You can set it to 0 as below:

newSubsite.AllProperties["__CurrentDynamicChildLimit"] = 0;
  • This property was not visible in the debugger. Are the properties documented somewhere?
    – Rugbrød
    Commented Sep 6, 2019 at 10:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.