Generate CSR for EIDAS certificate in key vault premium HSM with Organization Identifier (OID 2.5.4.97)

François Miermont 1 Reputation point
2026-07-16T13:14:51.4833333+00:00

Hello,

I do need to generate on my Premium Key Vault a CSR for a EIDAS Certificate. It's a certificate with "OI" in subject, for Organization Identifier (something in the pattern of "NTRFR-123456789").

I've tried

CN=api.contoso.com,O=Contoso, Ltd.,OU=Cloud Services,L=New York,S=NY,C=US,OI=NTRFR-123456789

and

CN=api.contoso.com,O=Contoso, Ltd.,OU=Cloud Services,L=New York,S=NY,C=US,2.5.4.97=NTRFR-123456789

But both are failing to generate the CSR.

Thank for your help !

Azure Key Vault
Azure Key Vault

An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.

0 comments No comments

2 answers

Sort by: Most helpful
  1. François Miermont 1 Reputation point
    2026-07-21T11:59:40.5133333+00:00

    I'm surprised I'm the first customer to have the issue, eIDAS certificate are not unusual.

    I'm not sure to fully understand the alternative approach ? Is there a way to get HSM certificate with eIDAS compliance ?

    Was this answer helpful?

    0 comments No comments

  2. Jerald Felix 18,200 Reputation points Volunteer Moderator
    2026-07-16T16:22:05.29+00:00

    Hello François,

    Greetings! Thanks for raising this question in Q&A forum.

    This issue is most likely happening because Azure Key Vault does not fully support custom X.500 subject attributes like “OI” (OID 2.5.4.97) in the CSR subject field. That’s why both formats you tried are failing during CSR generation.

    To resolve this, you can follow these workable options:

    Try using only standard supported subject fields Azure Key Vault CSR generation supports common attributes like CN, O, OU, L, S, and C. Remove the OI / 2.5.4.97 field and confirm CSR generation works first.

    If eIDAS requires Organization Identifier (OID 2.5.4.97) Generate the CSR outside Azure Key Vault using tools like OpenSSL where custom OIDs are allowed. Then:

    • Submit the CSR to your CA
      • After getting the signed certificate, import it into Key Vault using “Import certificate”
      Alternative approach (if HSM is mandatory)
      - Use Key Vault only for key storage (HSM protection)
      
         - Generate CSR through an external process/tool that supports custom OIDs
      
            - Ensure the CA workflow matches your compliance requirement (eIDAS)
      
    1. Validate certificate policy limits Key Vault uses a predefined certificate policy model and does not allow arbitrary RDN/OID extensions in subject DN, which is a current platform limitation.

    At this point, there is no direct way to include OI (2.5.4.97) in CSR generated from Key Vault itself, so this limitation would require either:

    • Using an external CSR generation process, or
    • Raising a feature request with Microsoft if this is critical for your use case.

    Next action: You (customer) will need to switch to external CSR generation or submit a feature request, as this is a product limitation rather than a configuration issue.

    If this answer helps you kindly accept the answer which will help others who have similar questions

    Best Regards,

    Jerald Felix.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.