From dc9ee3ccc17e5d8e44be96c66766effecdaebc39 Mon Sep 17 00:00:00 2001 From: "Bobby Abellana (aider)" Date: Wed, 19 Feb 2025 15:14:59 -0800 Subject: [PATCH] refactor: Switch to Azure Management auth in Connect-SharePoint function --- SharePointFunctions.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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