m365 login [options]
Allow to login, but remove the need to pass in the thumbprint parameter when using certificate based authentication
Would leverage the existing set of options and remove:
| Option | Description |
| ----------------------- | ----------------------------------------- |
| -thumbprint [thumbprint] | Certificate thumbprint. Required when authType is set to certificate |
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).
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.
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.