Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Error while creating site: Could not load file or assembly #4756

Open
5 tasks
DPArineo opened this issue Feb 25, 2025 · 1 comment
Open
5 tasks

[BUG] Error while creating site: Could not load file or assembly #4756

DPArineo opened this issue Feb 25, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@DPArineo
Copy link

When calling New-PnPSite I get the following error:

Error creating site: Could not load file or assembly 'System.IdentityModel.Tokens.Jwt, Version=6.35.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not find or load a specific file. (0x80131621)

Expected behavior

Create a SharePoint Site without group with english language setting

Actual behavior

Can not create the site due to a missing file or assembly

Steps to reproduce behavior

I get the error when using this code

Write-Output "Creating Site with Alias: $siteName"
try {
New-PnPSite -Type TeamSiteWithoutMicrosoft365Group -Title $siteTitle -Url $siteUrl -Lcid 1033 -Owner "[email protected]"
Write-Output "Team site created successfully."
}
catch {
Write-Output "Error creating site: $_"
}

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

Powershell 7.2
PnP.Powershell 2.12.0

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

  • Windows
  • Linux
  • MacOS
  • [x ] Azure Cloud Shell
  • Azure Functions
  • Other : please specify
@DPArineo DPArineo added the bug Something isn't working label Feb 25, 2025
@YuriySamorodov
Copy link
Contributor

Hi, @DPArineo . Are you getting the same error in PowerShell 5?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants