Docs Menu

Create and Delete Users - .NET SDK

On this page

  • Create a User
  • Delete a User

For all authentication methods except email/password authentication, Atlas App Services automatically creates a user object the first time a user authenticates. When you use email/password authentication, you must first register and confirm a user before Atlas App Services creates the user object.

To delete a user, call the DeleteUserFromServerAsync(User) method. This deletes the user from the server, and also deletes the user's local data, but does not delete any custom user data. To delete custom user data, see Delete a User's Custom Data.

Apple Account Deletion Requirements

Apple requires that applications listed through its App Store must give any user who creates an account the option to delete the account. Whether you use an authentication method where you must manually register a user, such as email/password authentication, or one that that automatically creates a user, such as Sign-In with Apple, you must implement user account deletion by June 30, 2022.

The following example shows how to delete a user account:

await app.DeleteUserFromServerAsync(user);
←  Work with Users - .NET SDKAuthenticate Users - .NET SDK →
Give Feedback
© 2022 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.