Convert a CER or P7B SSL certificate to a PFX (For Power Apps Portals or other projects)

The following post is a perfect example of a process that I don’t do very often and when I do, I keep forgetting how to do it. So today I am going to write it down so in the future, I can refer to this post. Maybe you will find it helpful as well.

In my case, it relates specifically to Power Apps Portals, but these steps would apply to any project where you need to convert an SSL certificate.

UPDATE: If you want to do this faster, and are comfortable with command-line tools, there is CRM Tip of the Day response to this post. Click here to view the Tip.

SSL Certificates in Power Apps Portals

When working specifically on Power Apps Portals projects, part of the process is to upload an SSL certificate in the Portal Admin Center in order to configure a custom URL.

This process is documented on the Microsoft Docs site.

You can get a SSL certificate from different providers. The provider I am currently using works well but they provide the SSL download as either a CER or P7B format only.

Power Apps Portals requires you upload the SSL certificate as a PFX file.

While there are some online tools available, I prefer to do this conversion on my own machine locally.

The steps shown are done on a Windows 10 machine. I don’t use a Mac because I am not a grandmother who got oversold at BestBuy or an arts student that hangs out at Starbucks. (Sorry Andrew Bibby)

Just use Windows. #LessMoneyMorePower

Steps to Convert P7B to PFX

Once you download the P7B (or CER) file from you SSL provider, double-click on the certificate file and the Windows certmgr application will open.

Windows Certmgr app

Locate the certificate of your domain name and double-click to install the cert on your local machine. (This does not need to be the machine of your website or project). A window with details of the SSL will appear on your screen. Click to install the certificate.

Install Certificate

Choose local machine and click Next.

Local machine

In the next screen, choose to place certificates in a particular store, click browse;

Locate the Store

Make sure you choose “Personal” store.

Personal

Click Finish to complete the import process.

Import SSL

The process should show as successful.

Success!

Next, from the Windows search box, type in “cert” and you should see a control panel option to Manage Computer Certificates. Click on that to launch the mmc.exe with the certificate option already enabled.

Navigate to the Personal Certificates folder and locate the certificate you installed earlier.

Locate certificate

Right click on the certificate entry and choose All Tasks -> Export

Export SSL Cert

The Certificate export wizard will start. Click Next

export Certificate

Make sure you choose to export the private key with the certificate.

Choose to export private key

The next screen is where you can specify the type of SSL you want to export, which as PFX (required for Power Apps Portals) Click next.

Choose .PFK format

Enter a password that you can remember but no one else will guess. If you are doing this for installing on a Power Apps Portal you will need to enter this at that time.

Pick password

Specify a filename. This can be anything you want it to be.

Certificate file name

The final step will complete the wizard and you will have a PFX SSL certificate file ready to upload to Power Apps Portals or whatever your project may be.

Final step

Summary

This was a fairly simple blog post, but I know I have had to go down some Google rabbit holes to figure this out in the past and I know a few others who have sometimes struggled a bit with this as well. This not typically something I do everyday. I hope you find it helpful (I am talking to you, future me)

Cover Photo by Robert Anasch on Unsplash

Mac at Starbucks Photo by Aral Tasher on Unsplash

Nick Doelman is a Microsoft Business Applications MVP specializing in training and consulting services for the Power Platform and related technologies. Nick uses a Windows machine because he needs to do real work like an adult. Follow Nick on twitter at @readyxrm

One thought on “Convert a CER or P7B SSL certificate to a PFX (For Power Apps Portals or other projects)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s