Is it possible to write java code which will go to login.microsoftonline.com to obtain authorization code and store it in String variable without any redirection ?
https://login.microsoftonline.com/{tenant}/oauth2/authorize? client_id=6731de76-14a6-49ae-97bc-6eba6914391e &response_type=code &redirect_uri=http%3A%2F%2Flocalhost%3A%12345 &response_mode=query &resource=https%3A%2F%2Fservice.contoso.com%2F &state=12345
Best Regards