List azure ad users using java

What is the way to connect to azure ad with username and password using java I use python to print all users of azure directory but couldn’t find a way to connect using username and password in java……