Yozez
Yozez

Reputation: 165

PowerShell - Certificate is not accessible to the current user

I'm using the Exchange Online PowerShell V2 module on MacOS and running the next command:

Connect-ExchangeOnline -CertificateFilePath "./certificate.pfx" -CertificatePassword "123" -AppID "appid" -Organization "[email protected]"

And I get this message:

Get-ConnectionContext: Certificate is not accessible to the current user.

I installed my certificate in the Mac KeyChain and it still doesn't work.

Did someone face this issue before? Thanks!

Upvotes: 2

Views: 1847

Answers (1)

Yozez
Yozez

Reputation: 165

The path to the certificate was wrong and led to a file that didn't exist. Fixing the path solves this issue.

Upvotes: 2

Related Questions