I am trying to run a script in Powershell 7 using PnP.PowerShell version 1.5.0 and I am getting error:
Could not load file or assembly 'Microsoft.Identity.Client, Version=126.96.36.199, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae'. Could not find or
| load a specific file. (0x80131621)
My connect statement is as follows:
Connect-PnPOnline -ClientId $env:PnPClientId -Url $URL -Tenant ($env:Tenant + ".onmicrosoft.com") -Thumbprint $env:PnPThumbprint
This seems to be an issue with PowerShell 7 as Windows PowerShell still seems to be working on this same PC using PnP.PowerShell.
Anyone have suggestions on what I might need to change? I have users running scripts in Windows PowerShell so hoping for a uniform statement that works in both PowerShell versions.