The process of building custom solutions for SharePoint Server.
Connect SharPoint Online WebService
Hello, I am trying to modify the below to authenticate to SharePoint Online instead of OnPrem server? How can I achieve this? Thank you.
Connect to web service
$uri = "https://test.sharepoint.com/sites/teamsites/_vti_bin/lists.asmx"
$service = New-WebServiceProxy -uri $uri -Namespace SpWs -UseDefaultCredential
$xmlDoc = new-object System.Xml.XmlDocument
$listName = "TestList"
$viewFields = $xmlDoc.CreateElement("ViewFields")
$query = $xmlDoc.CreateElement("Query")
$list = $service.GetListItems($listname,$null, $null, $viewfields,$null,$null,$null)
Microsoft 365 and Office | SharePoint Server | Development
2 answers
Sort by: Most helpful
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
2 deleted comments
Comments have been turned off. Learn more
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
4 deleted comments
Comments have been turned off. Learn more