Forum Discussion

Laxman V's avatar
Laxman V
Brass Contributor
Dec 17, 2022

Connect-PnPOnline in Azure function : parameter 'Url' because it is null

Dear community,

 

Connect-Pnponline command is not accpting in Azure function, Always gettings  below error "Cannot bind argument to parameter 'Url' because it is null." 

 

* the same script is working in local system.

 

 

I followed MS guide to resolve the issue but no luck.  appriciate your help and ides to solve the issue.

https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-pnp-provisioning#upload-the-pnp-powershell-module-for-your-azure-function,

4 Replies

  • Well it says siteurl is null, so it's null.

    Have you tried printing it too see if it has a value. because it sounds like it isn't assigned the value you want
    • Laxman V's avatar
      Laxman V
      Brass Contributor
      Thank you Nicolas for your resposne and suggestion.

      The probelm with PnP version in Azure function. 7.2 version is not working. hence I downgraded version from 7.2 to 7. it works fine

      https://github.com/pnp/powershell/issues/2136
      • Warwick Ward's avatar
        Warwick Ward
        Bronze Contributor
        Have you upgraded to Function 7.2 using the latest PnP.PowerShell release and tested it all works now?

Resources