PowerShell is used to query Sharepoint lists.
Requirements:
SharePoint Online Client Components SDK: https://www.microsoft.com/en-us/download/details.aspx?id=42038
https://github.com/mambojuice/SimpleSharepointListCmdlets
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
#Set-ExecutionPolicy Unrestricted
Import-Module "C:\Temp\SharepointCmdlets.psm1"
$SecurePassword = ConvertTo-SecureString "LYKILORÐ" -AsPlainText -Force
$c = New-SPContext -URL "https://expectus.sharepoint.com/teams/exmon" -UserID "gunnarsteinn@expectus.is" -Password $SecurePassword
$myList = Get-SPList -Context $c -ListName "Products"
$myArray = Get-SPListItems -Context $c -List $myList -Fields "ID","Title","Description"
$myArray