Skip to content

Instantly share code, notes, and snippets.

@aflyen
Last active June 20, 2022 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aflyen/0bcf8ce02ca52cbc5ab5ab8b2a48ca8f to your computer and use it in GitHub Desktop.
Save aflyen/0bcf8ce02ca52cbc5ab5ab8b2a48ca8f to your computer and use it in GitHub Desktop.
Use the SharePoint REST API to disable the Teamify prompt on modern sites
$SiteUrl = "https://contoso.sharepoint.com/sites/Project101"
# Connect to SPO using a interactive login
Connect-PnPOnline -Url $SiteUrl
# Invoke request to the SPO REST API
$Body = "{'siteUrl': '$($SiteUrl)'}"
Invoke-PnPSPRestMethod -Method Post -Url "/_api/GroupSiteManager/HideTeamifyPrompt" -Content $Body -Raw
# Expected response: {"odata.null":true}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment