I had been using V5.x.x for a while and am refactoring to upgrade to V6.x.x and I noticed the ability to override the serviceRoot is gone.
I am in Azure Gov Cloud and in Gov Cloud all requests made without specifying the service root fail with invalid audience. I am guessing that the client attempts to set service root to graph.microsoft.com instead of graph.microsoft.us which causes the failure.
Here are the previous docs indicating the need to override serviceRoot:
https://learn.microsoft.com/en-us/graph/sdks/national-clouds?tabs=java