How to get token using username and password and client id and grant type as password using microsoft graph or anything else using java language?

Avinash Patel 0 Reputation points
2024-03-10T07:13:35.27+00:00

User's image

I am able to get token using above api but the same thing i want to incorporate using java language and i am not able to find the code for the same? can anyone help? (do not want the REST api call)

Microsoft Security Microsoft Entra Microsoft Entra ID
Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AsithwMSFT 1,445 Reputation points Microsoft External Staff
    2024-03-10T21:09:08.73+00:00

    Hello Avinash

    are you looking api call implementation using Java ?

    if that is the case You might consider using Microsoft Authentication Library (MSAL) for Java

    https://github.com/AzureAD/microsoft-authentication-library-for-java

    https://github.com/Azure-Samples/ms-identity-msal-java-samples

    0 comments No comments

Your answer

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