Can't add a PFX to Azure Key Vault2019 Community Moderator ElectionNeed to generate key for azure to login VM using cisco process orchestrator403 error when authenticating with Azure Management API - nodejsSQL TD EKM Azure Key Vault - can't restore encrypted databaseError when signing PDF document with Azure Key Vault + Azure Function Apps + CA CertificateCreate RSA-SHA1 signatureAzure Authentication With Certificate SetupVSTS - How to convert a client certificate retrieved Azure Key Vault to a Powershell X509Certificate instanceSalt Master unable to access azure Blob storageNot able to upload Pfx certifcate to Azure key VaultHow to fix “The private key is not present in the X.509 certificate”

How to create a hard link to an inode (ext4)?

Could a cubesat propel itself to Mars?

Word for a person who has no opinion about whether god exists

Why don't MCU characters ever seem to have language issues?

Space in array system equations

Why does the negative sign arise in this thermodynamic relation?

How to pass a string to a command that expects a file?

What Happens when Passenger Refuses to Fly Boeing 737 Max?

Peter's Strange Word

Can't find the Shader/UVs tab

Are babies of evil humanoid species inherently evil?

Aliens englobed the Solar System: will we notice?

Should I tell my boss the work he did was worthless

Do items de-spawn in Diablo?

What wound would be of little consequence to a biped but terrible for a quadruped?

How strictly should I take "Candidates must be local"?

BitNot does not flip bits in the way I expected

Subset counting for even numbers

How could our ancestors have domesticated a solitary predator?

Examples of a statistic that is not independent of sample's distribution?

Solving "Resistance between two nodes on a grid" problem in Mathematica

How does airport security verify that you can carry a battery bank over 100 Wh?

In the late 1940’s to early 1950’s what technology was available that could melt a LOT of ice?

Why does Captain Marvel assume the planet where she lands would recognize her credentials?



Can't add a PFX to Azure Key Vault



2019 Community Moderator ElectionNeed to generate key for azure to login VM using cisco process orchestrator403 error when authenticating with Azure Management API - nodejsSQL TD EKM Azure Key Vault - can't restore encrypted databaseError when signing PDF document with Azure Key Vault + Azure Function Apps + CA CertificateCreate RSA-SHA1 signatureAzure Authentication With Certificate SetupVSTS - How to convert a client certificate retrieved Azure Key Vault to a Powershell X509Certificate instanceSalt Master unable to access azure Blob storageNot able to upload Pfx certifcate to Azure key VaultHow to fix “The private key is not present in the X.509 certificate”










0















I generated pfx certificate using the following script:



openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout security.key -out security.crt -subj "/CN=ourdomain.com" -days 3650
openssl pkcs12 -export -out security.pfx -inkey security.key -in security.crt -certfile security.crt


Next, i'm trying to add this certificate into our Azure Key Vault (into certificates section). After using this command:




$cer = Import-AzureKeyVaultCertificate -VaultName $vaultName -Name
$certificateName -FilePath 'security.pfx' -Password $securepfxpwd




i get the following error:




Import-AzureKeyVaultCertificate : Private key is present in more than
one item in certificate collection




This certificate is successfully used by our application and doesn't throw any errors in the process.










share|improve this question


























    0















    I generated pfx certificate using the following script:



    openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout security.key -out security.crt -subj "/CN=ourdomain.com" -days 3650
    openssl pkcs12 -export -out security.pfx -inkey security.key -in security.crt -certfile security.crt


    Next, i'm trying to add this certificate into our Azure Key Vault (into certificates section). After using this command:




    $cer = Import-AzureKeyVaultCertificate -VaultName $vaultName -Name
    $certificateName -FilePath 'security.pfx' -Password $securepfxpwd




    i get the following error:




    Import-AzureKeyVaultCertificate : Private key is present in more than
    one item in certificate collection




    This certificate is successfully used by our application and doesn't throw any errors in the process.










    share|improve this question
























      0












      0








      0


      1






      I generated pfx certificate using the following script:



      openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout security.key -out security.crt -subj "/CN=ourdomain.com" -days 3650
      openssl pkcs12 -export -out security.pfx -inkey security.key -in security.crt -certfile security.crt


      Next, i'm trying to add this certificate into our Azure Key Vault (into certificates section). After using this command:




      $cer = Import-AzureKeyVaultCertificate -VaultName $vaultName -Name
      $certificateName -FilePath 'security.pfx' -Password $securepfxpwd




      i get the following error:




      Import-AzureKeyVaultCertificate : Private key is present in more than
      one item in certificate collection




      This certificate is successfully used by our application and doesn't throw any errors in the process.










      share|improve this question














      I generated pfx certificate using the following script:



      openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout security.key -out security.crt -subj "/CN=ourdomain.com" -days 3650
      openssl pkcs12 -export -out security.pfx -inkey security.key -in security.crt -certfile security.crt


      Next, i'm trying to add this certificate into our Azure Key Vault (into certificates section). After using this command:




      $cer = Import-AzureKeyVaultCertificate -VaultName $vaultName -Name
      $certificateName -FilePath 'security.pfx' -Password $securepfxpwd




      i get the following error:




      Import-AzureKeyVaultCertificate : Private key is present in more than
      one item in certificate collection




      This certificate is successfully used by our application and doesn't throw any errors in the process.







      azure azure-keyvault






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 6 at 16:24









      skyrunnerskyrunner

      357




      357






















          1 Answer
          1






          active

          oldest

          votes


















          2














          First, you could generate a key as .pem file instead of .key file then convert PEM to PFX, try the following commands:



          openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout security.pem -out security.crt -subj "/CN=ourdomain.com" -days 3650
          openssl pkcs12 -export -out security.pfx -inkey security.pem -in security.crt


          This works on my side:



          enter image description here



          Details from Importing Certificates to Key Vault






          share|improve this answer

























          • it does work indeed. Thank you very much for your help, Nancy.

            – skyrunner
            yesterday










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55027812%2fcant-add-a-pfx-to-azure-key-vault%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          First, you could generate a key as .pem file instead of .key file then convert PEM to PFX, try the following commands:



          openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout security.pem -out security.crt -subj "/CN=ourdomain.com" -days 3650
          openssl pkcs12 -export -out security.pfx -inkey security.pem -in security.crt


          This works on my side:



          enter image description here



          Details from Importing Certificates to Key Vault






          share|improve this answer

























          • it does work indeed. Thank you very much for your help, Nancy.

            – skyrunner
            yesterday















          2














          First, you could generate a key as .pem file instead of .key file then convert PEM to PFX, try the following commands:



          openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout security.pem -out security.crt -subj "/CN=ourdomain.com" -days 3650
          openssl pkcs12 -export -out security.pfx -inkey security.pem -in security.crt


          This works on my side:



          enter image description here



          Details from Importing Certificates to Key Vault






          share|improve this answer

























          • it does work indeed. Thank you very much for your help, Nancy.

            – skyrunner
            yesterday













          2












          2








          2







          First, you could generate a key as .pem file instead of .key file then convert PEM to PFX, try the following commands:



          openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout security.pem -out security.crt -subj "/CN=ourdomain.com" -days 3650
          openssl pkcs12 -export -out security.pfx -inkey security.pem -in security.crt


          This works on my side:



          enter image description here



          Details from Importing Certificates to Key Vault






          share|improve this answer















          First, you could generate a key as .pem file instead of .key file then convert PEM to PFX, try the following commands:



          openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout security.pem -out security.crt -subj "/CN=ourdomain.com" -days 3650
          openssl pkcs12 -export -out security.pfx -inkey security.pem -in security.crt


          This works on my side:



          enter image description here



          Details from Importing Certificates to Key Vault







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited yesterday

























          answered yesterday









          Nancy XiongNancy Xiong

          3,7271110




          3,7271110












          • it does work indeed. Thank you very much for your help, Nancy.

            – skyrunner
            yesterday

















          • it does work indeed. Thank you very much for your help, Nancy.

            – skyrunner
            yesterday
















          it does work indeed. Thank you very much for your help, Nancy.

          – skyrunner
          yesterday





          it does work indeed. Thank you very much for your help, Nancy.

          – skyrunner
          yesterday



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55027812%2fcant-add-a-pfx-to-azure-key-vault%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          1928 у кіно

          Захаров Федір Захарович

          Ель Греко