Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

How to disable users in bulk

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?

  • 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
    PerezAguiar 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
    Bipin D365 28,964 Super User 2024 Season 1 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
    Eiken 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans