Based on this tutorial: https://docs.microsoft.com/en-us/graph/tutorials/java?tabs=aad
I have resolved some issues with the code in the tutorial. This new graph tutorial already incorporates the client credentials flow, which I had a blog post for here: https://blogs.aaddevsup.xyz/2020/04/implement-client-credentials-flow-for-graph-java-client/