0

Trying to use Connect-PnPOnline to access SPO to run PowerShell script.

PS>Connect-PnPOnline -Url $tenancy -Credentials $mySPOCredentials
Connect-PnPOnline : Method not found: 'System.Threading.Tasks.Task Microsoft.SharePoint.Client.ClientRuntimeContext.ExecuteQueryAsync()'.
At line:1 char:1 + Connect-PnPOnline -Url $tenancy -Credentials $mySPOCredentials + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Connect-PnPOnline], MissingMethodException + FullyQualifiedErrorId : System.MissingMethodException,SharePointPnP.PowerShell.Commands.Base.ConnectOnline

Gives the above error.
Updated SharePointPnPPowerShellOnline Module - still doesn't work
Re-installed PnPOnline from .MSI - still doesn't work

  • get-module -Name SharePointPnp* Can you run this powershell command and share the snapshot ? – Arvi Jun 13 '18 at 1:29
  • PS>get-module -Name SharePointPnp* | select ModuleType, Version, Name ModuleType Version Name ---------- ------- ---- Binary 2.27.1806.0 SharePointPnPPowerShellOnline – shayward Jun 13 '18 at 14:52
  • Can you try to uninstall SharePoint Client Components (if you had installed) completely? and Then install the latest one. Please let me know how it goes. – Arvi Jun 13 '18 at 23:26
  • Uninstalled SharePoint Client Components Version 16.0.6518.1200 and then Installed Version 16.0.6906.1200. Same error. :( – shayward Jun 14 '18 at 0:29
  • I have looked at the PnP GitHub issues. People have tried to remove it from GAC, the SharePoint assemblies to get around the issue. I would suggest you to raise an issue there so that more people who faced this issue might help. Sorry, couldn't be of much assistance. – Arvi Jun 14 '18 at 0:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.