Auth0 Organization Invitations Do Not Automatically Delete

Overview

Auth0 does not automatically delete expired Organization invitations, leaving them in the system indefinitely. When querying the Management API for organization invitations, Auth0 returns all expired invitations regardless of their age. To prevent the Management API from returning old, expired invitations, create a custom script to identify and delete them manually.

Applies To

  • Auth0
  • Organization Invitations
  • Management API

Solution

Are expired Auth0 Organization invitations automatically deleted?

 

Currently, Auth0 does not automatically clean up or delete expired Organization invitations. Expired invitations remain in the system indefinitely and return in the payload when querying the Management API.

 

How are expired Organization invitations removed using the Management API?
Since Auth0 does not support automatic deletion, create a custom script to periodically check for and delete expired invitations. Implement the workaround to remove expired invitations by following these steps:

  1. Fetch the created invitations using the Get organization invitations Management API endpoint.
  2. Evaluate the expires_at attribute for each returned invitation to determine if it has expired.
  3. Delete the expired invitations using the Delete an organization invitation Management API endpoint.

Recommended content

No recommended content found...