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 Automate
Unanswered

Disable AD account

(0) ShareShare
ReportReport
Posted on by 19

I want to update a user for disabled his account.

 

Rifton007_0-1635348249731.png

 

But this action doesn't work, it returns me "Forbbiden" and I'm full admin

 

{"error":{"code":"Authorization_RequestDenied","message":"Insufficient privileges to complete the operation."}

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    This definitely looks like a permission issue. When you say you are full admin, is that Global Admin?

    2021-10-28_20-31-39.png

    I think you need at least the User Administrator role:

     

    2021-10-28_20-35-19.png


    Ellis

     


    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • freddo Profile Picture
    15 on at

    not working for me. Tested with Global admin (& user adminstrator)

  • Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    Hi @freddo ,

     

    Here is the output of the flow running again, with an admin role and as a standard user with no admin roles:

    Snag_134918aa.png

    Please post an extract of the flow and error message you are getting. Please also try with a new connection:

    Snag_1342bb36.png

    Ellis

  • jordanmastel Profile Picture
    28 on at

    Hello,

     

    I am having this problem with an account that has User administrator permissions, I also tried with an account that has global administrator permissions. The account I am trying to disable has an administrator role.

     

    After removing the Azure AD admin role from the account I am trying to disable, the issue immediately goes away. I tried creating a new connection. I also tried to remove the role first before disabling it with a separate action but I get a 403 forbidden error there as well.

     

    Is disabling (accountEnabled = no) on Admin users with Update User in Power Automate not supported? Is there a workaround? I am trying to use Power Automate to automate disabling of accounts that are not used/renewed after a period of time.

  • Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    User Administrator allows you to disable or enable SOME user accounts. As far as I know,  you can't disable accounts that have the Global Administrator role if the account you are using only has the User Administrator role:

    Azure AD built-in roles - Microsoft Entra | Microsoft Learn

     

    ekarim2020_0-1690718632558.png

     

     
    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site

     

  • jordanmastel Profile Picture
    28 on at

    Hey Ellis,

     

    The user account running the flow and the connection has Privileged Authentication Administrator, Privileged Role Administrator, and User Administrator.

     

    The account I am trying to disable has Azure AD Joined Device Local Administrator and Intune Administrator.

     

    Continues to fail due to "Insufficient privileges to complete the operation".

     

    I was able to work around this by using an app registration and an HTTP API patch action.

    jordanmastel_0-1690770377423.png

     

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard