0

I was using PowerShell to update items in SP On-Premise and now the sites are migrated to SharePoint online.

The PowerShell scripts updates multiple lists using WebServiceProxy and it doesn't seem to be working with SharePoint online.

Below is the snippet:

$service = New-WebServiceProxy -Uri $URI -Namespace -SpWs -UseDefaultCredentials False
$service.Credentials = new-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($creds.username,$creds.Password)

Now when I try to run this and get the list items, it says:

Exception calling "GetListItems" with "7" argument(s): Server was unable to process request ---> Access is denied

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.