Create SSL Certificate

The article is outdated, read updated article about SSL certificate in official documentation of Power BI.

Run the following command to generates the certificate by using powershell New-SelfSignedCertificate cmdlet on Windows 8 or higher.

For Windows 7 tool requires OpenSSL installation. Util openssll must be available from command line.

For install OpenSSL visit https://www.openssl.org or https://wiki.openssl.org/index.php/Binaries

pbiviz --create-cert

Create certificate (Mac OS X)

Usually OpenSSL utils available in Linux or Mac OS X operations systems.

Otherwise you can install from

Brew package manager

brew install openssl
brew link openssl --force

or by using MacPorts

sudo port install openssl

After installation OpenSSL for generating new certificate call:

pbiviz --create-cert

Create certificate (Linux)

OpenSSL utils aren’t available in your Linux operation system, you can install by using following commands.

For APT package manager:

sudo apt-get install openssl

For Yellowdog Updater, Modified:

yum install openssl

For Redhat Package Manager:

rpm install openssl

If OpenSSl already available in your operation system call

pbiviz --create-cert

to generate new certificate.

Or get from https://www.openssl.org or https://wiki.openssl.org/index.php/Binaries

Generate certificate manually

You can specify your certificates generated by any tools.

If you have OpenSSL in your system installed, you can run the following command to generate a new certificate

openssl req -x509 -newkey rsa:4096 -keyout PowerBICustomVisualTest_private.key -out PowerBICustomVisualTest_public.crt -days 365

Usually PowerBI-visuals-tools web server certificates are located at

%appdata%\npm\node_modules\PowerBI-visuals-tools\certs

for the global instance of the tools

or

<custom visual project root>\node_modules\PowerBI-visuals-tools\certs

for the local instance of the tools.

You should save the cert file as PowerBICustomVisualTest_public.cer and privatekey as PowerBICustomVisualTest_public.key if you use PEM format. Save cert file as PowerBICustomVisualTest_public.pfx if you use PFX format.

If your PFX cert file requires passphrase, you should specify in

\PowerBI-visuals-tools\config.json

at server section:

"server":{
    "root":"webRoot",
    "assetsRoute":"/assets",
    "privateKey":"certs/PowerBICustomVisualTest_private.key",
    "certificate":"certs/PowerBICustomVisualTest_public.crt",
    "pfx":"certs/PowerBICustomVisualTest_public.pfx",
    "port":"8080",
    "passphrase":"YOUR PASSPHRASE"
}