When setting up a Development or Test environment for Dynamics 365, one of the most common requirements is to configure SSL certificates for Dynamics 365 Server, ADFS, and/or a Portal such as Adxstudio. While in Production environments, you MUST use proper Certification Authority issued SSL certificates, often we use Self-Signed certificates in lower environments.
There are many ways to create Self-Signed certificates and the method I prefer to use is the MakeCert.exe command.
Where to get MakeCert.exe?
The MakeCert.exe tool is packaged in Windows SDK. You can download Windows SDK from below link.
https://developer.microsoft.com/en-us/windows/downloads/windows-8-sdk
Install Windows SDK
Run the setup. Click Next.
Select No and click Next.
Click Accept.
Click Install.
Create Certificate
Open Command prompt as an administrator.
1 |
CD C:\Program Files (x86)\Windows Kits\8.0\bin\x86 |
1 |
makecert -r -pe -e 01/27/2018 -eku 1.3.6.1.5.5.7.3.1 -ss My -n CN=portal.dyn365apps.local -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 -len 2048 |
Set the date (in this example 01/27/2018) to 1 year from today.
Set the CN (in this example CN=portal.dyn365apps.local)
Export Certificate
Export the certificate to a file path so you can then import it into your Server(s).
Click Start button and type MMC.
Click File > Add/Remove Snap-in.
Select Certificates and click Add.
Select My user account.
Click Finish.
Click OK.
Browse to Personal > Certificates store, right click the cert, click All Tasks > Export.
Follow the prompt to complete the wizard.
Click Next.
Select Yes, export the private key (This is optional. You can select No, if you prefer).
Select Export all extended properties. Click Next.
Enter a password.
Enter path to save.
Click Finish.
Click OK.
The certificate is now saved in the specified folder. You can copy this to relevant servers and install it.
IMPORTANT: Make sure to install under Current User and also under Local Machine. You need to install it in the Trusted Root Certification Authorities Certificate Store to avoid browser errors.
Thank you for visiting Dyn365Apps.com.
Follow me on Twitter to get the latest news, tips and tricks and more …
Until next time…