How to Get all the Lists in a SharePoint Online Site using REST

This script allows to get all the lists in a SharePoint Online site using the SharePoint REST API. The script defines a function where a WebRequest object is built in order to get back the information from SharePoint: SharePoint Online credentials, web request headers and method

1,029 times
Add to favorites
Office 365
E-mail Twitter Digg Facebook
  • A "pure" powershell module for CSOM or alternative
    2 Posts | Last post November 18, 2017
    • Thank you for this script work. I have had a surprisingly hard time finding successful PowerShell interfaces to SharePoint online. Are you aware of a "pure" powershell replacement for the CSOM client? I only mean, is there an import-module way rather than an SDK installation prerequisite? 
      If not, I had pretty good luck with this "not so pure" (but still executable inside of same powershell script) preamble: 
      $sourceNugetExe = ""
      $targetNugetExe = "$rootPath\nuget.exe"
      Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe
      Set-Alias nuget $targetNugetExe -Scope Global -Verbose
      nuget install Microsoft.SharePointOnline.CSOM
    • I'm afraid what you are looking for does not exist...we have CSOM and SPO cmdlets, but nothing in the middle