Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Disabling multiple users at once

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Dear all,

Introduction
I am quite new to the world of managing Microsoft Dynamics AX, and hence a basic question.

As I did not find the answer to my question on this forum, I thought it might interest others as well.

Question

Is it possible to disable multiple users at once without using scripts?

Background information

I know users can be disabled by double clicking on a user, clicking Edit and unchecking the Enable box.

This is, however, a lot of work to do for about 400 users. (400 as I want to disable almost all users in the ACP environment, to be enabled only if necessary).
So: is there a faster way to do this? I have a feeling there should be, but have been unable to find it.

Thanks in advance for any tips or advice!

*This post is locked for comments

  • Suggested answer
    Umesh Pandit Profile Picture
    Umesh Pandit 9,298 User Group Leader on at
    RE: Disabling multiple users at once

    To dis enable :

    update userinfo set [enable] = 0 where ID <> 'Admin'

    To enable :

    update userinfo set [enable] = 1 where ID <> 'Admin'

  • Hetkey Profile Picture
    Hetkey 7 on at
    RE: Disabling multiple users at once

    Anton, forgive me for being a noob but..how do I run this in D365?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Disabling multiple users at once

    That is a great addition, Anton, although I hope this will not be necessary to use this script too often ;)

  • Verified answer
    Anton Venter Profile Picture
    Anton Venter 19,493 Super User 2025 Season 1 on at
    RE: Disabling multiple users at once

    Hi Rogier, here two jobs to disable and enable all users. If you are going to use it often, you could put this code in classes and add the menu items to the users form.

    static void AV_disableAllUsers(Args _args)
    {
        UserInfo    userInfo;
        
        update_recordSet userInfo
            setting enable = NoYes::No
                where userInfo.id != 'Admin';
        
        info("Done!");
    }

    static void AV_enableAllUsers(Args _args)
    {
        UserInfo    userInfo;
        
        update_recordSet userInfo
            setting enable = NoYes::Yes
                where userInfo.id != 'Admin';
        
        info("Done!");
    }

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Disabling multiple users at once

    Thank you, Rik, I knew there should be a quick solution to this

  • Iulian Cordobin Profile Picture
    Iulian Cordobin 8,201 on at
    RE: Disabling multiple users at once

    I do not think it's possible without scripting (either a Job or a T-Sql script); that is without having to actually 'click' the number of times of the users you are going to disable.

  • Verified answer
    dekaasboer Profile Picture
    dekaasboer 1,530 on at
    RE: Disabling multiple users at once

    You could select the option "Edit in Grid" from the form. This way you still need to edit all the users but you'll manage in 10 minutes or less.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,074 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,900 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans