Loading...

Power Apps : permanently delete users

Power Apps : permanently delete users
Power Apps : permanently delete users Stephane Pelhatre Mon, 06/17/2024 - 18:07
Body

Introduction

When a user is deleted from the Microsoft 365 admin center, the user isn't removed from Dataverse environments in which it is active. Instead, the user's status is set to Disabled in the Power Platform. And you do have the possibility to delete it.
As a consequence many disabled users can pile up in the Power Platform.

With the feature 'Delete Disabled Users' Microsoft has introduced the possibility to permanently delete disabled users from the Power Platform.

After deleting a disabled user some storage will free up and you will be able to use the license for other users within the environment.

Tutorial

You first have to enable the feature Delete disabled users in your Power Platform environment. By default this setting is disabled.
Connect to Power Platform Admin Center (https://admin.powerplatform.microsoft.com/environments) , select the environment for which you want to enable the feature and click on Settings in the command bar.

01

Then expand Product section and go to Features.

02

Then scroll down until you find Delete disabled users option. It is turned off by default.

03

Turn it on and click on Save.

04

Now if you have a look to the users views in Power Platform Admin Center, you will see that two views have been added:

  • Users not in Microsoft Entra ID but exist in the environment
  • Users not in Microsoft Entra ID and soft deleted in the environment

05

Now open Microsoft Entra ID in Azure Portal and delete a user (Eric Gruber in my example).

06

Note that the deleted user and its data can be restored up to 30 days : it is a soft delete (opposed to permanent delete).

07

In Power Platform Admin Center we can see that user account has been disabled and that user is in soft delete state in Azure AD.

08

Then let's try to delete the user in Dynamics: click on the 3 dots and select Manager user in Dynamics 365.

09

Then in the form click on Delete in the ribbon : you will get an error that something went wrong while deleting the user.

10

Download the log file and open it. At the end of the file you get details on the error: user is present in Azure AD with state SoftDeleted.
Indeed it is not possible to delete in Dynamics a user that is in SoftDeleted state in Azure AD.

11

Now let's delete permanently the user in Azure AD : in Entra ID click on 'Deleted users' in the left pane, select the user (Eric Gruber) and click on Delete permanently.

12

Within Power Platform Admin Center we can see that user record has been moved to the view Users not in Microsoft Entra ID but exist in the environment and we get the message that user Eric Gruber does not exist in Azure AD.

13

Let's try to delete the user record in Dynamics again.

14

This time we don't get any error : user has been deleted... but like in Entra ID it is not a permanent delete but a soft delete.
In Power Platform Admin Center open the view Users not in Microsoft Entra ID and soft deleted in the environment : you can see the user.

15

Similar to Microsoft Entra ID, now we get the option to permanently delete the user from Power Platform Admin Center : button Delete permanently is displayed.
Click on it : you get a warning that user will be permanently deleted.

16

As you can see below message 'User has been permanently deleted in this environment' is displayed.

18

Image
/sites/default/files/2025-03/delete-account-icon-male-user-person-profile-vector-21208563.jpg

Published on:

Learn more
Featured Articles | Dynamics Chronicles
Featured Articles | Dynamics Chronicles

Welcome to our blog, the content is entirely dedicated to Microsoft Dynamics 365, CRM, Power Platform, Common Data Service (CDS) but also Azure. Follow us !

Share post:

Related posts

Building Standalone Apps with Power Apps Code Apps: Using Dataverse and Office 365 Users Connectors (Part 1)

In the Dynamics 365 and Power Apps ecosystem, we have several options for building applications, each one is for a specific type of requiremen...

7 days ago

Build AI-Powered Apps in Minutes with Power Apps Vibe: A Complete Guide

If you’ve ever tried building apps with Microsoft Power Apps, you know the process: creating tables, designing screens, adding controls, conne...

9 days ago

How to Vibe code yourself a Power App on vibe.powerapps.com

Recently Microsoft released a new way of developing apps within the Power Platform on vibe.powerapps.com. In this post, I will look at differe...

10 days ago

Power Apps Code App with Dataverse: Building CRUD Operations

In my previous blog post, I explained how to build a Code App using Power Platform Connectors. In that example, I used the Office 365 connecto...

11 days ago

Create MS Graph subscriptions in Power Apps without Power Automate

A while back I wrote a post about MS Graph subscriptions in Power Automate. Today I managed to do this directly within Power Apps.

11 days ago

Input and Output Parameters in Power Apps flows

Following on from yesterday's post about Input and Output Parameters in Power Automate, today I'm looking at the same for flows that are calle...

14 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy