I'm trying to develop a Microsoft authentication mechanism to let user login & logout. So far the login works smooth and same the logout also. But when I do logout a page appears of Microsoft showing its logging me out. My requirement is this should be done in behind the scene. Dependencies: <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.4.4</version> <relativePath /> </parent> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-oauth2-client</artifactId> </dependency> In Angular code: logout() { sessionStorage.clear(); localStorage.clear(); const logoutUrl = `https://login.microsoftonline.com/common/oauth2/logout?post_logout_redirect_uri=${encodeURIComponent(window.location.origin)}`; window.location.href = logoutUrl; } Currently the logout is handled in frontend. I want this to happen from the JAVA side through an API call. Is there any package or way around to do this silent logout? Continue reading...