Hello, you need to create a custom authenticator provider implementing the IAuthenticationProvider interface. Internally it will use MSAL Java to create a Confidential Client application using a certificate (2nd sample).
Please let me know if you need more help. If the answer was helpful to you, please accept it and, optionally, provide feedback so that other members in the community can benefit from it.