Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Certificate registration error on Dynamics v9 on-premise

Posted on by 3,079

I'm trying to set up a test environment with D365 on-prem, connecting to Sharepoint.  Both servers are individually running fine, using a wildcard SSL certificate.  Now that I'm trying to do the connection, I'm running this script on the CRM server, as per the instructions (of course with my real info in it):

.\CertificateReconfiguration.ps1 -certificateFile c:\Personalcertfile.pfx -password personal_certfile_password -updateCrm -certificateType S2STokenIssuer -serviceAccount Domain\UserName -storeFindType FindBySubjectDistinguishedName

And it fails, with the error "Set-CrmCertificate : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."

If I run it without the -updateCrm flag it works fine, but of course that's not sufficient to get me onto the next step of the SP integration.  So it's something to do with the writing of the certificate to the ConfigDb, but I don't know what.  The account I'm running this as and the service account I'm putting in there both have access to the database...not sure what else to check.   Any thoughts as to what else might be blocking this, or how I can get more info as to the issue? 

*This post is locked for comments

  • RE: Certificate registration error on Dynamics v9 on-premise

    Thank you so much! This solved my problem

  • Verified answer
    awalters Profile Picture
    awalters 3,079 on at
    RE: Certificate registration error on Dynamics v9 on-premise

    Found it!  In Deployment Manager, the web addresses were set up for SSL with the proper port, but the addresses just had the server name rather than the FQDN (so they didn't match the certificate).  Updated them to FQDN and re-ran the command, and all is well.

  • awalters Profile Picture
    awalters 3,079 on at
    RE: Certificate registration error on Dynamics v9 on-premise

    Also, I've gone into MMC and made sure that the account I'm running this as, as well as the service account, both have access to the certificate.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans