powershell icon indicating copy to clipboard operation
powershell copied to clipboard

[BUG] Could not find the resource embedded in the assembly "PnP.PowerShell"

Open prakashguru opened this issue 1 year ago • 4 comments

Reporting an Issue or Missing Feature

Connect-PnPOnline fails for access token in 3.0.0 but it worked on 2.12.0

Below is the powershell code used to connect to sharepoint.

Connect-PnPOnline -Url "https://xxxxx.sharepoint.com" -AccessToken "dfsjdhfjsdhfjsjh" 

Failing with following error message,

Could not find the resource "PnP.PowerShell.Commands.Properties.Resources.resources" among the resources "PnP.PowerShell.Commands.Resources.resources", "PnP.PowerShell.Commands.GraphPermissions.json", "PnP.PowerShell.Commands.SharePointPermissions.json", "PnP.PowerShell.Commands.O365ManagementPermissions.json", "PnP.PowerShell.Commands.parker.ico" embedded in the assembly "PnP.PowerShell", nor among the resources in any satellite assemblies for the specified culture. Perhaps the resources were embedded with an incorrect name.

Expected behavior

Connect-PnpOnline should succeed.

Actual behavior

Connect-PnpOnline fails in version 3.

Steps to reproduce behavior

just run the below command in version 3 Connect-PnPOnline -Url "https://xxxxx.sharepoint.com" -AccessToken "dfsjdhfjsdhfjsjh"

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

3.0.0

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

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

Is 3.0.0 changed the way on how to use -AccessToken ?

Also while updating 2.12.0 to 3.0.0 got an error like 3.0.0 is not catalog signed.

Install-Package: The version '3.0.0' of the module 'PnP.PowerShell' being installed is not catalog signed. Ensure that the version '3.0.0' of the module 'PnP.PowerShell' has the catalog file 'PnP.PowerShell.cat' and signed with the same publisher 'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US' as the previously-installed module 'PnP.PowerShell' with version '2.12.0' under the directory 'C:\xxxxx\PowerShell\Modules\PnP.PowerShell\2.12.0'. If you still want to install or update, use -SkipPublisherCheck parameter.

prakashguru avatar Apr 17 '25 17:04 prakashguru

Same error with connect-PnPOnline and sign issue in our Windows system.

Image

NiuBClass666 avatar Apr 17 '25 18:04 NiuBClass666

Hey @prakashguru , @NiuBClass666 - sorry about that , we are looking into fixing this. For now , we unlisted v3 and recommend using 2.12, will be releasing a newer version 3.0.1 once we have a fix for this,

gautamdsheth avatar Apr 17 '25 19:04 gautamdsheth

We released version 3.1, which will fix the issues you see with accessing resources. We are depending on an external (MS owned) signing service, and they have changed some things very recently there. I'm curious to hear if version 3.1 still has the signing warning you mention.

erwinvanhunen avatar Apr 18 '25 09:04 erwinvanhunen

@erwinvanhunen Thank you so much for the swift response! It is working as expected now. Not throwing any resource errors.

prakashguru avatar Apr 18 '25 10:04 prakashguru