Docs Menu
Docs Home
/ /
Atlas Device SDKs
/ /

Create and Delete Users - Java SDK

On this page

  • Create a User
  • Delete a User

For most authentication methods, Realm automatically creates a user account the first time a user authenticates. The only exception is email/password authentication. When you use email/password authentication, you must register and confirm a user before the user can authenticate to a Realm application.

The Java SDK does not have the ability to delete users through the SDK. You can delete users from the server using the App Services Admin API delete a user endpoints. You could optionally create an Atlas Function that uses the Admin API to delete a user, and call the function from the SDK.

To use your app in the future, the user must sign up for a new account. They can use the same credentials (depending on the authentication provider), but will not have the same User ID as their deleted account.


Deleting All User Data

Deleting a user only deletes the user object, which may contain associated metadata from the associated auth provider. This does not delete custom user data or other user data that your app stores in a linked collection or external services.

Use the Authentication Trigger DELETE event to programmatically clean up other data when you delete a user. For example, you can delete the user's data from your custom user data collection or another service.

← Manage Users