Skip to content

[BUG] Latest azure-functions-host broke Connect-PnPOnline #5350

Description

@Chrdik78

Reporting an Issue or Missing Feature

I now its because of underlying dependencies but I'd like to report an issue regarding 'Connect-PnPOnline' within an Azure functions. This occurs after a runtime update a week ago.

Expected behavior

A returned connection to the tenant or a specific SharePoint Site.

Actual behavior

The connection fails with "Method not found: 'Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.OptionsServiceCollectionExtensions.AddOptions(Microsoft.Extensions.DependencyInjection.IServiceCollection)'."

I tried a clean import after the Azure function has been loaded and I tried to start a new process, but that did not solve the problem.

I am loading the PnP.PowerShell module from a local wwwroot/MODELS folder but also tried auto dependency handling using the built-in features.

The same combination of libraries (including AZ modules to connect to KeyVault) work fine on a local machine.

Steps to reproduce behavior

Connect-PnPOnline [-pars].

I am using a certificate (base64) which worked for a long time and as a work-around I am trying to switch to use an AccessToken, but I like how Connect-PnPOnline handles all situations untill a week ago.

What is the version of the Cmdlet module you are running?

2.x and 3.2.0

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions