web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Solution for deleting ...
Power Automate
Answered

Solution for deleting a user with Power Automate

(0) ShareShare
ReportReport
Posted on by

Hello ,

 

I was wondering if there is way to automate the delete process of a user from the 365 environment using power Automate.

What our process is when someone leaves the company is to block sign in / remove him from all groups but keep the account active for 60 days and then delete that account . I was wondering if there is a way we can automate this using Power Automate. Any help I would truly appreciate. Thank you. 

 

Categories:
I have the same question (0)
  • Verified answer
    alrezac Profile Picture
    on at

    Hi,

     

    Looking at our documentation I don't see anyway to delete users through Power Automate. I don't believe it possible to delete users using any built in functions of Power Automate. It looks like there is already a suggestion to add this functionality in. https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Azure-AD-remove-User/idi-p/102139

     

    Regards,

     

    Alex

     

    -------

     

    Community Support Team _ Alex Rezac
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Thanasis Profile Picture
    on at

    Hello Thank you @alrez  for your response. One last thing , do you know if at least there is away to get a notification using flow or something else when a user has been disabled for at lets say 60 days ?

  • Schotty Profile Picture
    4 on at

    Hi Thanasis,
    I'm in the process of setting this up and I'm creating a SharePoint Off-boarding list and adding in Name, last day and last day +14 as the columns. I add the off-boarded user to a group with a basic license instead of a premium license.
    This way, after 14 days, I can remove the Out of Office and removing their basic license and a few other things and that flow will run every day, and notify me through Teams that xyz offboarded user left 2 weeks ago so manually delete the user.

  • Gyllentid Profile Picture
    894 on at

    @Thanasis If you mean the Azure user/license, you can delete a user with HTTP with calling graph.microsoft.com

     

    Screenshot 2022-03-23 at 19.14.48.png

     

    Though you will need to:

  • Thanasis Profile Picture
    on at

    @shavora That is great. Can I ask one more thing. What do I need to do if I want to disable and not delete ? 

  • Gyllentid Profile Picture
    894 on at

    @Thanasis Can you create an AD group with no rights to place them in? This you can do from power automate. You can also disable Azure users from power automate. Not sure these ideas meet your reqiurements though. I misread that t wasn't deleting you needed.

  • Thanasis Profile Picture
    on at

    @shavora  can you give me an example if you can. what would I use from the power automate to disable the user ?

    Do you think what @Schotty  suggested before would work?

  • Verified answer
    Gyllentid Profile Picture
    894 on at

    @Thanasis I am not sure you need to create a Sharpoint list for the functionality to work like you want. I am not sure why it's necessary. You can assign a user a security group with no permissions in Office 364 as well as assign them to an Azure ad group with no license attached. Those two things you can do from power automate. With or without a sharepoint list, that's possible, but a Sharepoint list can make it easier to track it, assign status start and end and be able to delete them from those criteria.

     

    With this function you can disable an azure user:

    Screenshot 2022-03-23 at 20.01.21.png

  • Thanasis Profile Picture
    on at

    @shavora  Thank you so much for that 

  • Sara16 Profile Picture
    17 on at

    @shavora Can you please provide the whole screenshot to know what values to be passed for the remaining fields of this 'HTTP'??

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard