Graph SDK: Create authprovider using client assertion in Java

Taro283 1 Reputation point
2020-12-18T01:21:22.567+00:00

I would like to create an authprovider with client assertion, signed JWT, instead of client secret to create an instance of a Microsoft Graph client.

I found an example of creating an authprovider with client secret in following page. https://learn.microsoft.com/en-us/graph/sdks/create-client?tabs=Java

However, I cannot find the article on how to create an authprovider with client assertion in Java.
Would it be possible or not supported in Java yet? If it's possible, please let me know how.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,772 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,771 questions
{count} votes

1 answer

Sort by: Most helpful
  1. 2020-12-18T23:02:56.497+00:00

    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.