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
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:
- 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.
- 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: