Skip to content

[BUG]When trying to run Enable-PnPFeature I get an error 'Feature with Id {featureID} is not installed in this farm, and cannot be added to this scope.' #5303

Description

@westleyMS

Reporting an Issue or Missing Feature

When calling Enable-PnPFeatures -identity {FeatureGuid} -scope web, the call fails with this error-
"Enable-PnPFeature: Feature with Id 'bced7401-2f20-445b-b1c0-111cf32ef160' is not installed in this farm, and cannot be added to this scope."

Expected behavior

It should enable the feature.

Actual behavior

It throws the error above

Steps to reproduce behavior

I connected app-only with this-
Connect-PnPOnline -Url $url -ClientId "{appID}" -CertificatePath .\cert.pfx -Tenant {tenantName}.onmicrosoft.com

Then I try to run the command-
Enable-PnPFeature -Identity $featureid -Scope Web

I can go in the UI and enable it, and it is there and enables.
I can run this if it is enabled-
Disable-PnPFeature -Identity $featureid -Scope Web

and that disables the feature.

I got a fiddler trace and see this call-
POST https://{tenantName}.sharepoint.com/_api/Web/Features/add(guid'{featureGUID}') HTTP/1.1

And the response-
{
"odata.error": {
"code": "-1, System.InvalidOperationException",
"message": {
"lang": "en-US",
"value": "Feature with Id '{featureGUID}' is not installed in this farm, and cannot be added to this scope."
}
}
}

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

3.1.0

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions