Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

when a user is disabled in one company how to make the user disabled in other companies also

Posted on by Microsoft Employee

Is there any event subscriber for that, Any guidance wil be great ,Thanks

Categories:
  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: when a user is disabled in one company how to make the user disabled in other companies also

    The user table is a global table. So you do not really need this functionality in my eyes?

    So when you disable login for a user that will be global for all companies.

    But maybe you mix up the user and the permissions. The permissions are set per company.

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: when a user is disabled in one company how to make the user disabled in other companies also

    Hi,

    You can try with the below event

       [EventSubscriber(ObjectType::Codeunit, Codeunit::LogInManagement, 'OnBeforeCompanyOpen', '', false, false)]

       local procedure OnBeforeCompanyOpen();

       begin

       end;

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans