I'm using C# (or VBScript) to issue a certificate from an Enterprise CA.
According to this answer, I need to specify the OID instead of the certificate name, and place it in an unexpected portion of code. (IMHO I should place it where the null string is)
I'm looking at certificate manager, templates, et.al, and can't locate the OID I should be using. Have any suggestions?
Certificate Templates are stored in the Configuration partition of Active Directory.
For instance, if your Certificate Template is named "Smartcard," then its DN would be:
The
msPKI-Cert-Template-OID
attribute of that object contains the OID you seek.Edit: Here's some Powershell:
I had trouble with finding the distinguished name for a certificate template, so I found a different way than the other answers by following these steps:
I think you may need this entire string for your domain OID.