Aug 26 2021 07:02 PM
I have the CSOM code below for trying to connect to SharePoint Online with MFA enabled:
$SiteUrl = "http://our-tenant.sharepoint.com"
#Setup Authentication Manager
$AuthenticationManager = new-object OfficeDevPnP.Core.AuthenticationManager
$Ctx = $AuthenticationManager.GetWebLoginClientContext($SiteUrl)
$Ctx.Load($Ctx.Web)
$Ctx.ExecuteQuery()
I am encountering the following error:
Error: Cannot find type [OfficeDevPnP.Core.AuthenticationManager]: verify that the assembly containing this type is loaded
I already have PnP SharePoint installed via "Install-Module PnP.PowerShell" so I am not sure what is wrong. For reasons, I cannot use the Connect-PnPOnline cmdlet.
How do I connect to SharePoint Online with CSOM if my account has MFA?
Aug 27 2021 12:11 AM
May 02 2023 12:56 PM