refactor: Switch to Azure Management auth in Connect-SharePoint function

This commit is contained in:
Bobby Abellana (aider) 2025-02-19 15:14:59 -08:00
parent 5e61686d51
commit dc9ee3ccc1

View File

@ -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