# Forcing logout via user management API

**URL:** <https://community.auth0.com/t/forcing-logout-via-user-management-api/57500>\
**Category:** Get Help\
**Tags:** logout\
**Created:** [February 7, 2021, 12:47am UTC](https://community.auth0.com/t/forcing-logout-via-user-management-api/57500 "2021-02-07T00:47:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![viraj](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/viraj/32/27278_2.png) [@viraj](https://community.auth0.com/u/viraj)\
**Post date:** [February 7, 2021, 12:47am UTC](https://community.auth0.com/t/forcing-logout-via-user-management-api/57500/1 "2021-02-07T00:47:01Z")

</div>

I use the spa-sdk to orchestrate authentication using Auth0, but have custom authz implementation server side.

I was looking for a way to invalidate a user’s auth0 session cookie/token using user management APIs, for situations where I want to force a user to log out and log back in. All the documentation I can find talks about redirecting the user to the logout endpoint, but to do that I’ll need to build a bunch of things that I can avoid doing if there’s a way to get the auth0 management api to do this for me instead.

Any ideas/suggestions/pointers?

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 8, 2021, 9:07am UTC](https://community.auth0.com/t/forcing-logout-via-user-management-api/57500/2 "2021-02-08T09:07:43Z")

</div>

Hey there!

Management API as the name suggest is for management purposes not authentication for this we have the Authentication API. Here’s the logout endoint:

[https://auth0.com/docs/api/authentication#logout](https://auth0.com/docs/api/authentication#logout)

---

<div class="post-metadata">

**Author:** ![viraj](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/viraj/32/27278_2.png) [@viraj](https://community.auth0.com/u/viraj)\
**Post date:** [February 8, 2021, 5:43pm UTC](https://community.auth0.com/t/forcing-logout-via-user-management-api/57500/3 "2021-02-08T17:43:15Z")

</div>

Thanks @konrad.sopala

Unless I’m missing something, the API you linked to is what I can redirect/send my users to in order to log them out. I am interested in being able to terminate their session from the backend system, without having the user navigate to `/v2/logout`, and without having access to their specific session tokens. For instance, a “invalidateAllSessions” type API that my application can hit, with the user’s identity info along with ways to validate the `client_id` of my application.

Is that a capability that Auth0 allows for/exposes?

---

<div class="post-metadata">

**Author:** ![viraj](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/viraj/32/27278_2.png) [@viraj](https://community.auth0.com/u/viraj)\
**Post date:** [February 11, 2021, 9:37pm UTC](https://community.auth0.com/t/forcing-logout-via-user-management-api/57500/4 "2021-02-11T21:37:06Z")

</div>

@konrad.sopala @dan.woda thought I’d ping once more before assuming this isn’t a supported capability, and find other ways to solve this problem.

Also, if you’re keeping score somewhere, would love for this to be something Auth0 allows for – it’ll make server-side management of user sessions much easier to manage.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [February 12, 2021, 6:08pm UTC](https://community.auth0.com/t/forcing-logout-via-user-management-api/57500/5 "2021-02-12T18:08:09Z")

</div>

> [@viraj](#):
>
> For instance, a “invalidateAllSessions” type API that my application can hit, with the user’s identity info along with ways to validate the `client_id` of my application.

This isn’t a feature we offer at the moment, but this request is something we are aware of. Thanks for sharing your use-case and for the detailed feedback!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 25, 2021, 10:38am UTC](https://community.auth0.com/t/forcing-logout-via-user-management-api/57500/6 "2021-02-25T10:38:31Z")

</div>


