title: Get-PnPListItem : Object reference not set to an instance of an object
body: <p>We sometimes see these errors when running via an Azure Function (only sometimes, not always).</p>
  
  <p>The module is imported using:</p>
  
  <pre><code>Import-Module "D:\home\site\wwwroot\modules\SharePointPnPPowerShellOnline.psd1" -Global;
  </code></pre>
  
  <p>(same response without the -Global).</p>
  
  <p>Use of Get-PnPListItem is:</p>
  
  <pre><code>Get-PnPListItem -List "$ListName" -Web $requestWeb
  </code></pre>
  
  <p>Where $requestWeb comes from Get-PnPWeb</p>
  
  <p>The actual error thrown is:</p>
  
  <p>Get-PnPListItem : Object reference not set to an instance of an object.
  at test.ps1: line 35
  + Get-PnPListItem
  + _______________
      + CategoryInfo          : WriteError: (:) [Get-PnPListItem], NullReferenceException
      + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Lists.GetListItem</p>
  
  <p>We use the 64 bit version of .Net in the Azure Function.</p>
  
  <p>Has anyone else seen this? It may possibly be due to an interaction with another Azure Function running at the same time, or two instances of the same Function.</p>