Can't delete pending users under App Users?

So I have a bunch of pending and unconfirmed users in the App Users section of my app. But I can’t seem to delete them. This is under the Pending tab.

I click on the 3 dots under the Action column and then choose Delete, but I get the message ‘user not found’ and the entry stays in the Pending list. These users have been here for months and I can’t get rid of them.

Here’s a screenshot of what I mean after I just tried to delete the first user on the list.

I also tried to go through cURL through the Admin API, but no luck there either.

Hi there!

Since there wasn’t a reply to your message, I tried to run it by our documentation bot. Here is the response I got :slight_smile:


To delete pending and unconfirmed users in MongoDB App Service, you can use either the App Services UI, CLI, or Admin API. Here are the steps to delete a user using each method:

  1. App Services UI:
  • Select “App Users” from the left navigation menu.
  • Under the “Users” tab, select the “PENDING” button.
  • Find the user in the list and click on the ellipsis (...).
  • Select the “Delete User” option from the context menu that appears and confirm your choice.
  1. App Services CLI:
  • Open your terminal and run the following command:
appservices users delete --user=<User ID>

Replace <User ID> with the ID of the user you want to delete.
3. Admin API:

  • Send a DELETE request to the Admin API endpoint in the following format:
curl --request DELETE \  --header 'Authorization: Bearer <access_token>' \  https://services.cloud.mongodb.com/api/admin/v3.0/groups/<groupId>/apps/<appId>/users/<userId>

Replace <access_token>, <groupId>, <appId>, and <userId> with the appropriate values.

If you are getting a “user not found” error, please ensure that you are providing the correct user ID when attempting to delete the user. Double-check the user ID and try again. If the issue persists, please provide more details about the steps you are taking and any error messages you are receiving so that I can assist you further.

Related resources: