Yvand / EntraCP

EntraCP (formerly AzureCP) is a claims provider that connects SharePoint to your Microsoft Entra ID tenant, in federated authentication
https://entracp.yvand.net/
Apache License 2.0
35 stars 8 forks source link

When installing AzureCP the step $config = [azurecp.AzureCPConfig]::GetConfiguration("AzureCPConfig") returns null #274

Closed toad-13 closed 1 week ago

toad-13 commented 1 month ago

I am trying to install AzureCP in order to replicate our current installation with the aim to upgrade to EntraCP. However, I did not install it and have not experience in how this works.

I have installed version 17 to match our current version, but when I run the following, I get a blank repsonse:

Add-Type -AssemblyName "AzureCP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=65dc6b5903b51636" $config = [azurecp.AzureCPConfig]::GetConfiguration("AzureCPConfig")

I have also tried updating to version 19, but the result is the same.

In addition to this, I have not found a guide that shows me how to set up a new SPTrustedIdentityTokenIssuer which is simply described by "To be enabled, AzureCP must be associated with the SPTrustedLoginProvider which stores the configuration of the trust with the trusted STS:"

Are you able to help or provide guides?

Yvand commented 1 month ago

@toad-13 the fact that you did not associate AzureCP with a SPTrustedIdentityTokenIssuer explains why this returns nothing. Creating a SPTrustedIdentityTokenIssuer is a pre-requisite and it depends a lot on your configuration. Here are some links that document how-to create the SPTrustedIdentityTokenIssuer: https://learn.microsoft.com/en-us/sharepoint/security-for-sharepoint-server/implement-saml-based-authentication-in-sharepoint-server https://learn.microsoft.com/en-us/sharepoint/security-for-sharepoint-server/set-up-oidc-auth-in-sharepoint-server-with-adfs https://learn.microsoft.com/en-us/sharepoint/security-for-sharepoint-server/set-up-oidc-auth-in-sharepoint-server-with-msaad

toad-13 commented 1 month ago

Thanks for your reply, I have created SPTrustedIdentityTokenIssuer and I still get a null entry for $config = [azurecp.AzureCPConfig]::GetConfiguration("AzureCPConfig")

Should I be trying to remove it and re-install it?

Yvand commented 1 month ago

@toad-13 once the trust is created, you need to associate the claims provider with that trust. Since you are using AzureCP (you should upgrade to EntraCP), the script is here:

$trust = Get-SPTrustedIdentityTokenIssuer "SPTRUST NAME"
$trust.ClaimProviderName = "AzureCP"
$trust.Update()

Note that you need to follow the whole procedure in this documentation, including the manual copy of the DLLs

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 week ago

This issue was closed because it has been stalled for 5 days with no activity.