You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Connect-Graph: Cert based authentication errors, documentation and error handling #162
Just tried to implement an application based workflow using the module and was facing an issue that was driving me nuts:
No matter what I tried, when running Connect-Graph it would complain about the parameter certificate being null.
I finally managed to solve the problem (after tracing the sourcecode), so here's what I learned from my ordeal:
The command is in desperate need for some help. Happy to help with that and some automation behind it, assuming I can find the time.
It looks for the certificate in the user store, but not in the computer store. This is a handicap for when I set up a task that is designed to run under a different account than my test account.
The parameter "CertificateName" should probably be renamed to "CertificateSubject"
Some front-up input validation during begin would allow a lot more user-friendly error messages.
On my feature-wishlist for the command:
Add a -Certificate parameter to the command, that accepts a X509Certificate2 object.
Add a -CertificatePath and a -CertificatePassword parameter, to enable pointing at a PFX file.
Remove the need to provide both CertificateName and CertificateThumbprint. It's redundant and if the user can provide the thumbprint, it doesn't use the name anyway. AB#7442
So if I want to use certificate to authenticate when connecting to Microsoft Graph, am I right in understanding that the flow needs to be the following:
Activity
DSotnikov commentedon Jul 31, 2020
So if I want to use certificate to authenticate when connecting to Microsoft Graph, am I right in understanding that the flow needs to be the following:
georgend commentedon May 5, 2021
#102
peombwa commentedon May 5, 2021
#440 added this in 1.2.0.
SjoerdV commentedon Jan 24, 2022
Examples of 'in the field' Modules that already have a great App-only authentication experience: