Skip to content

[BUG] Connect-PnPOnline from Azure Function #22

@NaffOff

Description

@NaffOff

Reporting an Issue or Missing Feature

When connecting "Connect-PnPOnline" from Azure Function on PowerShell Core 7 an error is thrown

Connect-PnPOnline -Url $env:SPO_Url -ClientId $env:SPO_AppId -ClientSecret $env:SPO_AppSecret
The type initializer for 'Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource' threw an exception.

Expected behavior

Connection successful - context available

Actual behavior

Connect-PnPOnline -Url $env:SPO_Url -ClientId $env:SPO_AppId -ClientSecret $env:SPO_AppSecret
The type initializer for 'Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource' threw an exception.

Steps to reproduce behavior

Create a new Azure Function with Application Insights enabled
Runtime version ~3
PowerShell Core 7
Platform x64
requirements.psd1 @{ 'PnP.PowerShell' = "0.1.31-nightly" }
Create a function and exec Connect-PnPOnline -Url [URL] -ClientId [AppId] -ClientSecret [AppSecret`]

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

PnP.PowerShell 0.1.31

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions