microsoft-teams-apps-requestateam icon indicating copy to clipboard operation
microsoft-teams-apps-requestateam copied to clipboard

Error during Sharepoint List template demployment - Cannot find an overload for "Load"

Open Luuk-Ros opened this issue 2 years ago • 4 comments

Description

During the REQUESTS SPO SITE CONFIGURATION step i get the following error:

Error occured while configuring the SharePoint site: Cannot find an overload for "Load" and the argument count: "1".

I already uninstall-module "PnP.Powershell" but i keep getting this issue. this is the version that is installed after running the script: get-module "PnP.powershell"

ModuleType Version Name ExportedCommands


Manifest 1.4.0 PnP.PowerShell {Add-PnPAlert, Add-PnPApp, Add-PnPApplicationCustomizer, Add-PnPAzureADGroupMember...}

please advise.

Steps to reproduce

  1. Download latest version
  2. Start Powershell ISE in Administrator mode
  3. Go to path where deploy.ps1 is located
  4. run deploy.ps1 with the following settings:
  5. .\deploy.ps1 -TenantName "xxxxx" -TenantID "4ab7ef65-aa55-4aa5-9394-211xxxxxx" -RequestsSiteName "Request a team app" -RequestsSiteDesc "Used to store Teams Requests" -ManagedPath "sites" -SubscriptionId 73xxxx-648c-46ff-a59a-59dbxxxe10bd -Location "West Europe" -ResourceGroupName "weu-p1-lapp-01" -AppName "Requestateamapp" -ServiceAccountUPN "[email protected]" -IsEdu $false
  6. enter keyvault name
  7. no for sensitivity label

Expected results

A succesful deployement with the Sharepoint lists on the newly created site.

Actual Results

Deployment succesfull but there was an error inbetween resulting in no Sharepoint lists in the site.

REQUESTS SPO SITE CONFIGURATION

Configuring SharePoint site... Applying provisioning template... Applied template Error occured while configuring the SharePoint site: Cannot find an overload for "Load" and the argument count: "1".

Solution component

Deployment Script

Operating system (environment)

Windows

Additional Info

No response

Luuk-Ros avatar Mar 07 '22 09:03 Luuk-Ros

Here is the output in Powershell up until the error:

DEPLOYMENT SCRIPT STARTED

(c) Microsoft Corporation ### Installing required PowerShell Modules... Installed modules _ _
_ __ ___ __ _ _ _ ___ ___ | |_ __ _ | |_ ___ __ _ _ __ ___
| '| / _ \ / || | | | / _ \/ __|| __| _____ / _ | _____ | __| / _ \ / || '_ _ \ | | | __/| (| || || || /_ | | ||| (_| |||| |_ | /| (| || | | | | | || _| _, | _,_| _||/ _| _,| _| ___| _,||| || || |_|
Launching Azure sign-in... Checking for availability of Key Vault... Key Vault is available. Launching Azure AD sign-in...

Launching Azure CLI sign-in... Account Environment TenantId TenantDomain AccountType


[email protected] AzureCloud 4ab7ef65-aa55-4aa5-9394-xxxxxxxxx xxxxx.com User
az : WARNING: A web browser has been opened at https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with az login --use-device-code. At C:\git\microsoft-teams-apps-requestateam-Latest\Deployment\Scripts\deploy.ps1:800 char:13

  • $cliLogin = az login
  •         ~~~~~~~~
    
    • CategoryInfo : NotSpecified: (WARNING: A web ...e-device-code`.:String) [], RemoteException
    • FullyQualifiedErrorId : NativeCommandError

Connected to Azure Launching PnP sign-in... WARNING: A newer version of PnP PowerShell is available: 1.9.39.

Use 'Update-Module -Name PnP.PowerShell ' to update. Use 'Get-PnPChangeLog -Release 1.9.39' to list changes.

You can turn this check off by setting the 'PNPPOWERSHELL_UPDATECHECK' environment variable to 'Off'.

Connected to SPO

AZURE AD APP CREATION

az : WARNING: The underlying Active Directory Graph API will be replaced by Microsoft Graph API in a future version of Azure CLI. Please carefully review all breaking changes introduced during this migration: https://docs.microsoft.com/cli/azure/microsoft-g raph-migration At C:\git\microsoft-teams-apps-requestateam-Latest\Deployment\Scripts\deploy.ps1:512 char:12

  • $app = az ad app list --filter "displayName eq '$appName'" | Conv ...
    
  •        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (WARNING: The un...graph-migration:String) [], RemoteException
    • FullyQualifiedErrorId : NativeCommandError

Azure AD App 'Requestateamapp' already exists - updating existing app... az : WARNING: The underlying Active Directory Graph API will be replaced by Microsoft Graph API in a future version of Azure CLI. Please carefully review all breaking changes introduced during this migration: https://docs.microsoft.com/cli/azure/microsoft-g raph-migration At C:\git\microsoft-teams-apps-requestateam-Latest\Deployment\Scripts\deploy.ps1:530 char:13

  •         az ad app update --id $app.appId --required-resource-acce ...
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (WARNING: The un...graph-migration:String) [], RemoteException
    • FullyQualifiedErrorId : NativeCommandError

Waiting for app to finish updating... Updated Azure AD App az : WARNING: The underlying Active Directory Graph API will be replaced by Microsoft Graph API in a future version of Azure CLI. Please carefully review all breaking changes introduced during this migration: https://docs.microsoft.com/cli/azure/microsoft-g raph-migration At C:\git\microsoft-teams-apps-requestateam-Latest\Deployment\Scripts\deploy.ps1:512 char:12

  • $app = az ad app list --filter "displayName eq '$appName'" | Conv ...
    
  •        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (WARNING: The un...graph-migration:String) [], RemoteException
    • FullyQualifiedErrorId : NativeCommandError

Granting admin content for Microsoft Graph... az : WARNING: The underlying Active Directory Graph API will be replaced by Microsoft Graph API in a future version of Azure CLI. Please carefully review all breaking changes introduced during this migration: https://docs.microsoft.com/cli/azure/microsoft-g raph-migration At C:\git\microsoft-teams-apps-requestateam-Latest\Deployment\Scripts\deploy.ps1:560 char:9

  •     az ad app permission admin-consent --id $global:appId
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (WARNING: The un...graph-migration:String) [], RemoteException
    • FullyQualifiedErrorId : NativeCommandError

Waiting for admin consent to finish... Granted admin consent

AZURE AD APP CREATION FINISHED

TEAMS REQUESTS SITE CREATION

Creating Teams Requests SharePoint site... Site already exists! Do you wish to overwrite? ( y (overwrite) / n (exit) ): y

REQUESTS SPO SITE CONFIGURATION

Configuring SharePoint site... Applying provisioning template... Applied template Error occured while configuring the SharePoint site: Cannot find an overload for "Load" and the argument count: "1".

Luuk-Ros avatar Mar 07 '22 10:03 Luuk-Ros

Were you able to resolve this issue? I am getting the same error message.

shales77 avatar Mar 29 '22 20:03 shales77

Not yet, anxiously waiting for a reply from someone that knows where the error is coming from :)

Luuk-Ros avatar Apr 06 '22 07:04 Luuk-Ros

@Luuk-Axians Please can you uninstall all of PnP:

Uninstall-Module PnP.PowerShell -AllVersions -Force

Grab the latest package as I have updated it today, it should force the install of 1.9.0 of PnP and re-run the script, let me know how you get on.

Thanks

alexc-MSFT avatar Jun 08 '22 20:06 alexc-MSFT