Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Open a LogIn form on another users session when I terminate his active one

Posted on by 107

When I log in using some credentials if another user is already logged in with that user I am closing all of his open forms but not killing his session. What I need to do is after I do that a form for login should open for that user. Is it possible to control the session for a different user and run that login form through code?

*This post is locked for comments

  • Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    RE: Open a LogIn form on another users session when I terminate his active one

    You'll have to tell us what your form currently does, before we can suggest how to change it. Also, I think you should explain why you built such a logic in the first place, instead of using the normal authentication mechanism.

  • Zoran Golomeov Profile Picture
    Zoran Golomeov 107 on at
    RE: Open a LogIn form on another users session when I terminate his active one

    Hi Martin

    Will try to explain a bit clearer about the needed requirements...

    There is a customized form used for worker logIn.

    Lets say UserA is logged in using credentials "XXX". If UserB tries to login with the same worker credentials "XXX" it should close all forms for UserA, logOut his worker session and display again the Worker LogIn Form. Is there a way UserB can control the process of showing the Worker LogIn form on the UserA session?

    Hope this helps clarifying my problem.

  • Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    RE: Open a LogIn form on another users session when I terminate his active one

    Could you please elaborate what you're talking about?

    It seems that you use somebody else's credentials to log into Windows and connect to the running session, therefore you see applications running in the session. I assume you close AX client and start it again and you're surprised that it still uses credentials of the current user. But what else do you expect? You log into Windows as UserA and therefore you're logged as UserA in AX as well, because AX uses Windows authentication. If you want to use AX as UserB, log into Windows as UserB and not UserA. It's technically possible to use RunAs to start AX client as a different user, but while it's useful for testing, it doesn't make much sense in normal usage.

    Then you mentioned some form, but it's not clear what you want it to do. Maybe you didn't realize that AX uses Windows authentication.

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

Featured topics

Product updates

Dynamics 365 release plans