Cli-microsoft365: Update command: m365 login, remove the need to pass in --thumbPrint

Created on 29 Nov 2020  路  5Comments  路  Source: pnp/cli-microsoft365

Usage

m365 login [options]

Description

Allow to login, but remove the need to pass in the thumbprint parameter when using certificate based authentication

Options

Would leverage the existing set of options and remove:
| Option | Description |
| ----------------------- | ----------------------------------------- |
| -thumbprint [thumbprint] | Certificate thumbprint. Required when authType is set to certificate |

Additional Information

I believe we should be able to determine the thumbprint from the passed in certificate. This would remove the need to pass it in, simplifying the usage experience in situations when the thumbprint is not readily available (like when fetching the certificate from an Azure Key Vault).

enhancement feature request work in progress

Most helpful comment

The code for calculating the thumbprint is simple (the effort that went into it is inversely proportional tho 馃槄), but I lost code coverage and cannot for the life of me figure it out. I submitted the PR, if someone has insights I'd really appreciate it.

All 5 comments

If it's possible to derive the thumbprint from the cert, we should definitely do it to simplify things. Let's look into this and implement if possible.

I have a POC for this running, so I can confirm it is possible. You can assign this one to me, I'll get the PR ready.

Awesome, thank you @YannickRe it's all yours 馃憤馃徎

Hero! 馃憦

The code for calculating the thumbprint is simple (the effort that went into it is inversely proportional tho 馃槄), but I lost code coverage and cannot for the life of me figure it out. I submitted the PR, if someone has insights I'd really appreciate it.

Was this page helpful?
0 / 5 - 0 ratings