Skip to content

[BUG] New-PnPAzureCertificate adds hostname to SAN #3546

@JMyklebust

Description

@JMyklebust

Reporting an Issue or Missing Feature

The New-PnPAzureCertificate cmdlet is creating certificates containing the hostname of the generating computer in the SAN field.

Expected behavior

Since we don't specify any SAN data (in fact we are missing av parameter for this?). No data should be in the SAN field.
Or alternatively the same data that is put in the CommonName parameter should be put in SAN.

Actual behavior

The SAN field is containing both "localhost" and the hostname of my computer.
image

Steps to reproduce behavior

Generate a certificate and check the public part afterwards:
New-PnPAzureCertificate -CommonName "Testname" -OutCert .\cert.crt

What is the version of the Cmdlet module you are running?

version 2.2.0 (Running on PowerShell 7.3.8)

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions