pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
987 stars 665 forks source link

Connect-PnpOnline using certificate fails when called with a group-managed service account from within a scheduled task #2675

Closed saderemipcgus closed 4 years ago

saderemipcgus commented 4 years ago

Reporting an Issue or Missing Feature

Please confirm what it is that your reporting Issue

Expected behavior

Please describe what output you expect to see from PnP-PowerShell Cmdlets Connect-PnpOnline should connect to our tenant using certificate with a group-managed service account from within a scheduled task

Actual behavior

Please describe what you see instead. Please provide samples of HTML output or screenshots Error in transcript `PS>TerminatingError(Connect-PnPOnline): "Exception has been thrown by the target of an invocation." Connect-PnPOnline : Exception has been thrown by the target of an invocation. At C:\scripts\unspecialpath\Scripts\RS-useracctref-05-11-2020--2346.ps1:10 char:1

Which version of the PnP-PowerShell Cmdlets are you using?

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

(you can retrieve this by executing Get-Module -Name *pnppowershell* -ListAvailable) 3.10.1906.0. Also tried with the latest, 3.20.2004.0.

How did you install the PnP-PowerShell Cmdlets?

ghost commented 4 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

KoenZomers commented 4 years ago

The upcoming June 2020 release on June 9th, 2020 will include completely rewritten and retested connect options. I'm pretty sure your issue will be addressed in that version. I'm therefore closing this issue for now. If you find that the June 2020 release does not fix it, feel free to reopen this issue and we can have a look at it.