# Redirect to custom logout page after federated logout

**URL:** <https://community.auth0.com/t/redirect-to-custom-logout-page-after-federated-logout/123657>\
**Category:** Get Help\
**Tags:** sessions, logout\
**Created:** [December 25, 2023, 8:09am UTC](https://community.auth0.com/t/redirect-to-custom-logout-page-after-federated-logout/123657 "2023-12-25T08:09:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zjarko](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/zjarko/32/61525_2.png) [@zjarko](https://community.auth0.com/u/zjarko)\
**Post date:** [December 25, 2023, 8:09am UTC](https://community.auth0.com/t/redirect-to-custom-logout-page-after-federated-logout/123657/1 "2023-12-25T08:09:26Z")

</div>

A user logged-in to Auth0 using their Azure Active Directory account when using federated log out should be taken to a custom logout page with a query string parameter for a button click action on the logout page. Clicking the button should take them to that URL.

The current implementation uses the _federated_ query string parameter, followed by a simplified _returnTo_ without any query string parameters:

https://\<tenant\_name\>.eu.auth0.com/oidc/logout?federated&returnTo=https%3A%2F%[2Fwww.google.com](http://2Fwww.google.com)

It performs the Auth0 logout and then hands it over to the Idp which finishes the process at location:  
[https://login.microsoftonline.com/](https://login.microsoftonline.com/)\<azure\_ad\>.onmicrosoft.com/oauth2/v2.0/logoutsession

Auth0 documentation used to implement the federated logout:  
Redirect Users with Alternative Logout ([auth0.com](http://auth0.com))  
Use the OIDC Endpoint to Log Users Out of Auth0

None of them helped produce the desired result. Thank you.

---

<div class="post-metadata">

**Author:** ![zjarko](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/zjarko/32/61525_2.png) [@zjarko](https://community.auth0.com/u/zjarko)\
**Post date:** [January 4, 2024, 2:47pm UTC](https://community.auth0.com/t/redirect-to-custom-logout-page-after-federated-logout/123657/2 "2024-01-04T14:47:23Z")

</div>

Referring to [Use the OIDC Endpoint to Log Users Out of Auth0](https://auth0.com/docs/authenticate/login/logout/log-users-out-of-auth0) documentation and using the `post_logout_redirect_uri` parameter helped achieve the redirect.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 18, 2024, 2:47pm UTC](https://community.auth0.com/t/redirect-to-custom-logout-page-after-federated-logout/123657/3 "2024-01-18T14:47:55Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
