Skip to content

Connect-Graph: Cert based authentication errors, documentation and error handling #162

Closed
@FriedrichWeinmann

Description

@FriedrichWeinmann

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions