here’s my dumb way but it worked.
gist: Automatically remove members from Cursor team settings page whose email doesn't match your organization's domain. · GitHub
- Install the Script in Tampermonkey:
- Click on the Tampermonkey icon in your browser
- Select “Create a new script”
- Copy and paste the entire script code
- Click File → Save or press Ctrl+S (Cmd+S on Mac)
- Configure the Script:
- Locate this line in the code:
const ALLOWED_EMAIL_DOMAIN = "@yourdomain.com"; // Replace with your organization's email domain
Here’s how it works
- Navigate to Settings | Cursor - The AI Code Editor
- The script will automatically:
- Scan all team members
- Identify members whose email addresses don’t match your specified domain
- Automatically remove those members
- Refresh the page every minute (or your configured interval) to check for new members
- Never close the browser tab
You can adjust the script to meet your requirements.