The tenant can be added from the EntraCP global configuration page in the central administration, or using PowerShell:
Follow the steps below to add a connection to your Entra ID tenant using the Central Administration:
Navigate to the SharePoint Central Administration > Security > EntraCP Global configuration.
In the section Register a new Microsoft Entra ID tenant, fill the fields to add a connection to your tenant.
Click on Add tenant to save your changes.
Run the script below to add a connection to your Entra ID tenant using Powershell:
Add-Type-AssemblyName"Yvand.EntraCP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=65dc6b5903b51636"$config=[Yvand.EntraClaimsProvider.EntraCP]::GetConfiguration()$settings=$config.Settings# Add a tenant using a client secret$tenant=New-Object"Yvand.EntraClaimsProvider.Configuration.EntraIDTenant"$tenant.Name="TENANTNAME.onmicrosoft.com"$tenant.SetCredentials("clientId","clientSecret")$settings.EntraIDTenants.Add($tenant)$config.ApplySettings($settings,$true)# Add a tenant using a client certificate$tenant=New-Object"Yvand.EntraClaimsProvider.Configuration.EntraIDTenant"$tenant.Name="TENANTNAME.onmicrosoft.com"$certificateFilePath="pfxCertificateFilePath"$certificatePassword="pfxCertificatePassword"$tenant.SetCredentials("clientId",$certificateFilePath,$certificatePassword)$settings.EntraIDTenants.Add($tenant)$config.ApplySettings($settings,$true)# Commit the configuration to the database$config.Update($true)