Exibições:

Erro ADFS ao acessar o CRM

Descrição:


Ao tentar acessar a url do crm é apresentado uma mensagem de erro do AD FS.

Mensagem:


    Ocorreu um erro
    Ocorreu um erro. Entre em contato com o administrador para obter mais infomrações.
    Detalhe do erro
    - Activity ID: 00000000-0000-0000-5b09-0080000000cd (Código pode variar)
    - Erro Time: ....

Analise:


Como o erro em questão é generico, ou seja, não apresenta informações relevantes para a uma possível identificação do ocorrido será necessário identificar alguns itens:

    - Qual o ambiente crm que o cliente está acessando?
    - Qual o endereço ADFS que está sendo acessados?

Em posse dessas informações devemos acessar o Servidor ADFS para analisar as informações no EVENT VIEWER.

EventViewer:


    - No Event Viewer: 
        - Aplication and Services... / AD FS:
            - Localize o registro com as informações de erro.
                Obs.: Se necessário realizer o acesso ao CRM para que seja gerado um novo registro.

Registro:


An error occurred during an attempt to build the certificate chain for the relying party trust "ADRESS-ADFS" certificate identified by thumbprint 'KEY CERTIFICATE'. Possible causes are that the certificate has been revoked, the certificate chain could not be verified as specified by the relying party trust's encryption certificate revocation settings or certificate is not within its validity period.
 
You can use Windows PowerShell commands for AD FS to configure the revocation settings for the relying party encryption certificate. Relying party trust's encryption certificate revocation settings: CheckChainExcludeRoot The following errors occurred while building the certificate chain: The revocation function was unable to check revocation for the certificate. 
The revocation function was unable to check revocation because the revocation server was offline. 

User Action: Ensure that the relying party trusts encryption certificate is valid and has not been revoked. Ensure that AD FS can access the certificate revocation list if the revocation setting does not specify "none" or a "cache only setting. Verify your proxy server setting. For more information about how to verify your proxy server setting, see the AD FS Troubleshooting Guide (http://go.microsoft.com/?LinkId=182180). 

Explicação:  


Neste caso a mensagem de erro faz referência a configuração de "Revogação do Certificado" do ADFS, onde ele busca uma certificadora publica para validar (CheckChainExcludeRoot). Se o certificado for auto assinado não há a necessidade de realizar essa chegacagem.

Correção:
Para correção será necessário alterar as configurações do "CheckChainExcludeRoot" e "EncryptionCertificateRevocationCheck" de "CheckChainExcludeRoot" para "None".

Procedimento:


Acesse o servidor ADFS:
    - Através do PowerShell execute os seguintes comandos:
        - Validar se a revogação esta ativo: Get-AdfsRelyingPartyTrust | Select-Object Identifier, SigningCertificateRevocationCheck, EncryptionCertificateRevocationCheck
            - Verifique as configurações do "CheckChainExcludeRoot" e "EncryptionCertificateRevocationCheck" se estão definidos como "CheckChainExcludeRoot".
        - Alterar as configurações: Get-AdfsRelyingPartyTrust -Identifier <Identifier URL> | Set-AdfsRelyingPartyTrust -SigningCertificateRevocationCheck None -EncryptionCertificateRevocationCheck None
    
    - Após a alteração realize o update do certificado e tente acessar novamente o crm.

Link Ref.: https://www.torivar.com/2016/03/22/adfs-3-0-disable-revocation-check-windows-2012-r2/    
    

https://<ADFS FQDN>/adfs/ls/IdpInitiatedSignon.aspx (onde <ADFS FQDN> e o nome que voce colocou no certificado)