Delete stub users from an environment (preview)

[This article is prerelease documentation and is subject to change.]

Stub user records are created as placeholder records in the user table. The records are typically imported from external systems during migration of those applications. The stub user records are created with a disabled status and assigned with a security role. These users can’t log into the Dataverse environment. For more information, see How stub users are created.

The stub users who are still active in the Microsoft Entra ID can be converted and activated as Dataverse users by mapping the stub users to the Microsoft Entra ID user. For stub users who are no longer in Microsoft Entra ID, they remain in the disabled status. Disabled status stub users can be deleted.

Important

  • This is a preview feature.
  • Preview features aren't meant for production use and may have restricted functionality. These features are available before an official release so that customers can get early access and provide feedback.

Delete disabled status stub users

Complete the following steps to turn on the Delete disabled users feature.

  1. Go to the Power Platform admin center.
  2. In the navigation pane, select Environments.
  3. Select a specific environment.
  4. Select Settings > Product > Features.
  5. Scroll through the list and to find the Delete disabled users area.
  6. Set the Enable delete disabled users setting to On.
  7. Select Save.

Soft delete stub users

Soft deleted users remain in the system with a disabled status. Learn more: What happens when a user is soft deleted?

You can manually soft delete a stub user.

  1. Go to the Power Platform admin center.
  2. In the navigation pane, select Environments.
  3. Select a specific environment.
  4. Select Settings > Users + Permissions > Users.
  5. Select Disabled Users from the Filter list.
  6. Enter the stub user in the Search box.
  7. Select the user.
  8. Select the Delete button to delete the user in the environment.

Permanently delete stub users

To permanently delete stub users, the stub users must first be soft deleted. These Prerequisites must be met before a user can be permanently deleted.

To manually permanently delete a stub user, complete the following steps.

  1. Go to the Power Platform admin center.
  2. In the navigation pane, select Environments.
  3. Select a specific environment.
  4. Select Settings > Users + Permissions > Users.
  5. Select Disabled Users from the Filter list.
  6. Enter the stub user in the Search box.
  7. Select the user, and then select Delete Permanently.
  8. Select Delete to delete the user from the environment.

Bulk delete stub users

You can delete multiple stub users using bulk delete. Soft-deleted users remain in the system with a disabled status. Learn more: What happens when a user is soft deleted?

To soft delete stub users in bulk, complete the following steps.

  1. Go to the Power Platform admin center.

  2. In the navigation pane, select Environments.

  3. Select a specific environment.

  4. Select Settings > Users + Permissions > Users.

  5. Select Bulk delete from the command bar.

  6. Select the Stub users option from the Use saved view dropdown list.

  7. Select Next and review the list of records to be soft deleted.

    Note

    The list of records may contain Microsoft Entra ID users who were permanently deleted from Microsoft Entra ID prior to June 2022. These users can also be deleted as stub users. Select the Back button to return to the query page and modify the filter to change the list of selected users. For example, select + Add row to add an additional filter.

  8. Select Next.

  9. Enter a job name and select a date and time to schedule the deletion system job. Select Next.

  10. Select the email notification checkbox if you want to be notified when a job is completed. Select Next.

  11. Verify the query and the number of records to be deleted, and then select Run bulk delete.

Review the status of bulk delete job

  1. Go to the Power Platform admin center.

  2. In the navigation pane, select Environments.

  3. Select a specific environment.

  4. Select Settings > Audit and logs > System jobs.

  5. Select the bulk delete job and review the results. The results show records in the Successes row that should match the number of records from your previous soft deletion system job. Review a deleted user in the audit log.

    If you enabled Dataverse auditing in the environment and in the User table, you can see the list of soft deleted users in the Audit Summary view.

Permanently delete stub users in bulk

To permanently delete stub users, the stub users must first be soft deleted. These Prerequisites must be met before stub users can be permanently deleted.

  1. Go to the Power Platform admin center.
  2. In the navigation pane, select Environments.
  3. Select a specific environment.
  4. Select Settings > Users + Permissions > Users.
  5. Select Bulk delete from the command bar.
  6. Select the Soft Deleted Users view in the Use saved view dropdown list.
  7. Select Next and review the list of records to be permanently deleted.
  8. Select Next again.
  9. Enter a job name and select a date and time to schedule the deletion system job. Select Next.
  10. Select the email notification checkbox if you want to be notified when a job is completed. Select Next.
  11. Verify the query and the number of records to be deleted, and then select Run bulk delete.

Review the job results and verify that all soft deleted stub users were permanently deleted.

See also

Delete a user from your organization