FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    How to delete a user from multiple tenants using a single endpoint call in FusionAuth?

    Scheduled Pinned Locked Moved Unsolved
    Q&A
    2
    2
    818
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      anirudh.vekariya
      last edited by

      Hello FusionAuth community,

      I have configured multiple tenants in my FusionAuth instance, and I'm using FusionAuth for security purposes and storing user data. I have a scenario where a user can exist in multiple tenants, and I need to delete that user from all tenants simultaneously using a single API endpoint call.

      Currently, I am using the "DELETE /api/user/{userId}?hardDelete=true" endpoint to delete the user. However, this endpoint only deletes the user from a single tenant, and I'm not passing the X-FusionAuth-TenantId in the request header, so its scope is global.

      Is there an available endpoint in FusionAuthClient or an alternative approach that would allow me to delete a user from all tenants at once using a single API call?

      Thank you for your assistance.

      danD 1 Reply Last reply Reply Quote 1
      • danD
        dan @anirudh.vekariya
        last edited by

        Hiya @anirudh-vekariya!

        There is no way to do this.

        Since tenants are designed to be logically separate, FusionAuth has no concept of a user that spans tenants. I would not expect this to be something to be built into FusionAuth because of that.

        Hope this helps.

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 0
        • First post
          Last post