Created
March 8, 2022 08:51
-
-
Save aflyen/70bd99e409881c5de74ce2bdc205ca2a to your computer and use it in GitHub Desktop.
Hide the first run dialog from modern team and communication sites in SharePoint Online using C# and PnP.Framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task DisableTemplateGalleryDialog(SharePointClientContext context) | |
{ | |
Web web = context.Web; | |
context.Load(web); | |
await context.ExecuteQueryRetryAsync(); | |
web.NextStepsFirstRunEnabled = false; | |
web.Update(); | |
await context.ExecuteQueryRetryAsync(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment