The “Feature activation failed” error in SharePoint occurs when trying to activate a SharePoint feature but the process fails due to various reasons, such as missing dependencies, incorrect configurations, permission issues, or corrupted feature files. Below is a detailed step-by-step guide to troubleshooting and resolving this issue.
1. Understand the Error Message
Before proceeding with troubleshooting, it is essential to analyze the error message displayed when trying to activate the feature.
Where to Check for Errors?
- SharePoint UI
- Navigate to Site Settings > Site Collection Features or Manage Site Features.
- Try activating the feature and check the error message.
- ULS Logs (For On-Premises)
- Run the following PowerShell command to filter logs by Correlation ID:
Get-SPLogEvent | Where-Object {$_.Correlation -eq "<your-correlation-id>"} | Format-List
- Run the following PowerShell command to filter logs by Correlation ID:
- Event Viewer
- Open Event Viewer (
eventvwr.msc
). - Check logs under Windows Logs > Application.
- Open Event Viewer (
2. Check Feature Dependencies
Many SharePoint features depend on other features. If a required feature is missing, the activation will fail.
How to Check Dependencies?
- Navigate to the Feature folder on the SharePoint server:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\TEMPLATE\FEATURES\
- Open the feature.xml file inside the problematic feature folder.
- Look for the
<ActivationDependencies>
tag:<ActivationDependencies> <ActivationDependency FeatureId="GUID-OF-DEPENDENT-FEATURE" /> </ActivationDependencies>
- Ensure that the dependent feature is activated by running:
Get-SPFeature | Where-Object {$_.Id -eq "GUID-OF-DEPENDENT-FEATURE"}
- If missing, activate the dependent feature manually:
Enable-SPFeature -Identity "FeatureName" -Url "http://YourSiteCollectionURL"
3. Ensure Proper Feature Scope
SharePoint features can be scoped at different levels: Farm, Web Application, Site Collection, or Web. If a feature is scoped incorrectly, activation will fail.
How to Check and Correct Scope?
- Open PowerShell and run:
Get-SPFeature -Limit All | Select DisplayName, Scope
- Verify if the feature is available at the correct scope.
- If incorrect, update the
feature.xml
file to match the required scope.
Example of a Correct Feature Scope in feature.xml
:
<Feature Id="GUID-HERE" Title="Custom Feature" Scope="Site" Hidden="FALSE">
- Scope=”Farm” → Farm-wide feature
- Scope=”WebApplication” → Web application level
- Scope=”Site” → Site Collection level
- Scope=”Web” → Specific Site (Web)
- If incorrect, deactivate and reactivate the feature:
Disable-SPFeature -Identity "FeatureName" -Url "http://YourSiteCollectionURL" Enable-SPFeature -Identity "FeatureName" -Url "http://YourSiteCollectionURL"
4. Check for Missing Assemblies (For Farm Solutions)
If a feature depends on a custom DLL (assembly) and it is missing, activation will fail.
How to Verify Assemblies?
- Open Central Administration → Manage farm solutions.
- Check if the required solution is deployed correctly.
- If missing, redeploy the solution:
Add-SPSolution -LiteralPath "C:\PathToSolution\YourSolution.wsp" Install-SPSolution -Identity "YourSolution.wsp" -GACDeployment
- Ensure the assembly exists in the Global Assembly Cache (GAC):
[System.Reflection.Assembly]::LoadWithPartialName("YourAssemblyName")
- If missing, manually add it to the GAC:
gacutil -i "C:\PathToYourDLL\YourAssembly.dll"
- If missing, manually add it to the GAC:
5. Check Permissions
Activation may fail due to insufficient permissions.
How to Fix Permission Issues?
- Ensure you are logged in as a Site Collection Administrator.
- If using PowerShell, run SharePoint Management Shell as Administrator.
- Grant necessary permissions to the user:
Add-SPShellAdmin -UserName "DOMAIN\User"
For Farm Solutions, ensure the SharePoint Timer Service has the correct permissions:
- Open Services (
services.msc
). - Find SharePoint Timer Service and restart it.
6. Restart IIS and Timer Service
If the feature activation still fails, try restarting related services.
- Restart IIS:
iisreset
- Restart the SharePoint Timer Service:
Restart-Service SPTimerV4
- Clear SharePoint configuration cache:
- Stop the SharePoint Timer Service.
- Navigate to:
C:\ProgramData\Microsoft\SharePoint\Config\GUID-folder\
- Delete all XML files except
cache.ini
. - Open
cache.ini
, change the value to 1, and save. - Start the SharePoint Timer Service.
7. Manually Activate the Feature via PowerShell
If the UI method fails, try activating the feature using PowerShell.
Enable-SPFeature -Identity "FeatureName" -Url "http://YourSiteCollectionURL"
If it still fails, force activation:
Enable-SPFeature -Identity "FeatureName" -Url "http://YourSiteCollectionURL" -Force
8. Redeploy the Feature
If the feature is corrupted, deactivate, uninstall, and reinstall it.
- Deactivate the feature:
Disable-SPFeature -Identity "FeatureName" -Url "http://YourSiteCollectionURL"
- Uninstall the feature:
Uninstall-SPFeature -Identity "FeatureName"
- Remove the feature folder (For On-Premises):
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\TEMPLATE\FEATURES\FeatureName
- Redeploy the feature:
Install-SPFeature -Path "FeatureName"
- Reactivate the feature:
Enable-SPFeature -Identity "FeatureName" -Url "http://YourSiteCollectionURL"
9. Contact Microsoft Support
If the issue persists, consider reaching out to Microsoft Support with:
- The ULS log Correlation ID.
- A copy of the feature.xml file.
- Any related Event Viewer logs.