How do I get the authentication URL and user ID using spring-cloud-azure-starter-active-directory?
I understand that AD authentication is possible with the source code of the following URL, but I would like to output the user and authentication URL in the log.
https://login.microsoftonline.com/{tenantID}/oauth2/v2.0/authorize?response_type=code&client_id={clinet_id}
user001@tenant.onmicrosoft.com
Redirects are unknown, but user IDs can be output in the following format
@GetMapping("Adimn")
public ModelAndView Adimn(HttpServletRequest request) {
try {
String userId = request.getUserPrincipal().getName();
log.info(userId);
return new ModelAndView("redirect:" + "/index");
}