Flow to delete a user account

Copper Contributor

I've been trying to delete a user account with power automate flow, tried a lot but it ends up giving up as nothing worked. Now tried to at least disable a user account using 'update user action' in power automate and it works fine except shows error if the user has any admin center access/ admin roles assigned. So, do I need to remove the assigned roles for the user first before disabling the account, if so, how could I achieve that within power automate flow itself? Struggling with this for days : <

2 Replies

Hi @Sara161,

Deleting or disabling a user account that has admin center access or admin roles assigned can be tricky, as these roles often require special permissions to manage. In order to achieve this within Power Automate, you'll likely need to use the Microsoft Graph API to handle the process since it offers more granular control over user account management.

Please check this link from Power Platform Community, i think it should help you to solve your issue:

Delete user from Azure AD through power automate c... - Power Platform Community (microsoft.com)

Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.

If the post was useful in other ways, please consider giving it Like.

Kindest regards,

Leon Pavesic

Thanks for the suggested solution. I followed the HTTP method to delete a user and got invalid request error : )