Run the following script on the server running the central administration, in a new PowerShell process:
Automated installation script for EntraCP
1<#
2.SYNOPSIS 3 Deploys the SharePoint solution EntraCP.wsp, created with the deployment mode "Application"
4.DESCRIPTION 5 Run this script ONLY on the server running the central administration, in a new PowerShell process.
6 The script does not require any modification, except to update the path in $packagefullpath.
7 8 EntraCP.wsp uses deployment mode "Application", which by design makes its deployment much more secure than AzureCP.
9 Because contrary to AzureCP, running Install-SPSolution does NOT install the features in the farm, which prevents conflicts.
10.LINK11 https://entracp.yvand.net/docs/usage/installation/
12#>1314$product="EntraCP"15$packagefullpath="C:\YvanData\$product.wsp"# Only update the path here1617# Add the solution if it's not already present in the farm18if($null-eq(Get-SPSolution-Identity"$product.wsp"-ErrorActionSilentlyContinue)){19Write-Host"Adding solution $product.wsp to the farm..."20Add-SPSolution-LiteralPath$packagefullpath21}2223$count=024while(($count-lt20)-and($null-eq$solution))25{26Write-Host"Waiting for the solution $product.wsp to be available..."27Start-Sleep-Seconds528$solution=Get-SPSolution-Identity"$product.wsp"29$count++30}3132if($null-eq$solution){33Write-Error"Solution $product.wsp could not be found in the farm."34throw("Solution $product.wsp could not be found in the farm.")35}3637Write-Host"Deploying solution $product.wsp globally..."38Install-SPSolution-Identity"$product.wsp"-GACDeployment3940$solution=Get-SPSolution-Identity"$product.wsp"41$count=042while(($count-lt20)-and($false-eq$solution.Deployed))43{44Write-Host"Waiting for the solution $product.wsp to be deployed..."45Start-Sleep-Seconds1046$solution=Get-SPSolution-Identity"$product.wsp"47$count++48}4950if($null-ne(Get-SPFeature|Where-Object{$_.SolutionId-eq$solution.SolutionId})-or51$null-ne(Get-SPClaimProvider-Identity"$product"-ErrorActionSilentlyContinue)){52Write-Warning"The claims provider and/or the features are already installed, skip Install-SPFeature"53}else{54Write-Host"Installing the features in the solution $product.wsp..."55Install-SPFeature-SolutionId$solution.Id-AllExistingFeatures56}57Write-Host"Finished."
Do the following on the server running the central administration:
In this step, you set the assembly bindings in the machine.config file using the content in file assembly-bindings.config, to ensure EntraCP can load its dependencies.
Why are those bindings needed?EntraCP uses NuGet packages
Microsoft.Graph and
Azure.Identity, which both require assembly bindings to work with .NET Framework 4.8 (
more info).Why setting them in the machine.config?Since SharePoint runs in many processes (w3wp.exe, owstimer.exe, powershell.exe, etc…), the only config file that can propagate the bindings to all is the machine.config.
Steps order
This step must be completed on all SharePoint servers, after the solution was deployed.
Assembly bindings depend on the EntraCP version
Make sure to use the assembly-bindings.config corresponding to your version of EntraCP, as each release has unique assembly bindings.
Open file %systemroot%\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config in a text editor.
Locate the XML node runtime (search <runtime /> or <runtime>).
Replace it with the content in the file assembly-bindings.config.
EntraCP includes special page TroubleshootEntraCP.aspx, that helps to validate the install/update was completed successfully, and the
prerequisites are met. It is standalone (it does NOT use your EntraCP configuration) and can be found in the central administration > Security. More info about this page.
To be enabled, EntraCP must be associated with the SPTrustedLoginProvider created when the federation was configured. Execute this script on the server running the central administration: