Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

How to disable users in bulk

(0) ShareShare
ReportReport
Posted on by 82

I figured I could export to Excel the Status(isenabled) field, edit and update.  However, though Status is searchable, I cannot include it as a column to export.  I don't want to do this on the AD/MS365 level but only in the single DEV sandbox environment.

I guess I could go ahead and write an SDK utility but, is there a way to disable in bulk otherwise?

  • Swift but Sincere Profile Picture
    82 on at
    RE: How to disable users in bulk

    Yes, I find the security group thing to be the documented answer.  I don't know when Microsoft instituted this but, it is new to me.  I hesitated to do the more invasive programmatic adjustment.  Seems that if the functionality is not presented to the user, it is poor practice -- and risky -- to hack Microsoft.

  • Suggested answer
    PerezAguiar Profile Picture
    on at
    RE: How to disable users in bulk

    Hey!

    You can assign a security group to an environments. Those users that are NOT members of the security group, will be disabled.  Or if you already have a security group assigned, just remove them from the environment

    Regards,

  • Suggested answer
    Bipin D365 Profile Picture
    28,977 Moderator on at
    RE: How to disable users in bulk

    Hi,

    You can try power automate to disable user records in bulk without written any code.

  • Suggested answer
    Eiken Profile Picture
    on at
    RE: How to disable users in bulk

    Hi,

    You use C# code.

    Please refer to the following link.

    Sample: Disable a user | Microsoft Learn

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,125 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,871 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans