diff --git a/SharePointFunctions.ps1 b/SharePointFunctions.ps1 index 81c79a4..e9d258c 100644 --- a/SharePointFunctions.ps1 +++ b/SharePointFunctions.ps1 @@ -47,8 +47,8 @@ function Connect-SharePoint { # Ignore disconnection errors } - # Use modern authentication with device code flow - Connect-PnPOnline -Url $siteUrl -Interactive ` + # Use Azure Management authentication + Connect-PnPOnline -Url $siteUrl -UseWebLogin ` -ErrorAction Stop ` -WarningAction SilentlyContinue