[BUG] New-PnPAzureCertificate: Object reference not set to an instance of an object
Reporting an Issue or Missing Feature
Please confirm what it is that your reporting
Expected behavior
Please describe what output you expect to see from the PnP PowerShell Cmdlets Generation of certificate(s)
Actual behavior
Please describe what you see instead. Please provide samples of output or screenshots.

Steps to reproduce behavior
Please include complete script or code samples in-line or linked from gists
$cert=New-PnPAzureCertificate -OutPfx pnp.pfx -OutCert pnp.cer -CertificatePassword (ConvertTo-SecureString -String "password" -AsPlainText -Force)
New-PnPAzureCertificate -OutPfx pnp.pfx -OutCert pnp.cer -CertificatePassword (ConvertTo-SecureString -String "password" -AsPlainText -Force)
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing Get-Module -Name "PnP.PowerShell" -ListAvailable)
Currently using 1.12.26 nightly release:

Which operating system/environment are you running PnP PowerShell on?
- [ ] Windows
- [ ] Linux
- [X] MacOS
- [ ] Azure Cloud Shell
- [ ] Azure Functions
- [ ] Other : please specify
@carolinedpena It seems to fail on trying to write the certificate to disk. I don't have a Mac so cannot try this out. Can you try specifying a full path to where it should write the certificates to and see if that makes a difference?
@KoenZomers - specifying the full path results in the same error message:

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days
I have the same issue on my Mac
Most likely because MacOS uses forward slashes for paths (not back slashes). And although it throws an error on the second line (with the forward slashes), it still creates the certs in the correct folder, but the first line (back slashes doesn't at all).

Closing for now. Feel free to reopen if the certs are not created.