Login question

tompynationtompynation Member Posts: 398
How can you see if a user is logged in with a Database Login, or with Windows Authentication?

Answers

  • NaviDevNaviDev Member Posts: 365
    edited 2007-10-06
    Use the Session table. and see for the Login Type
    Navision noob....
  • tompynationtompynation Member Posts: 398
    i dont have a session table... I'm using navision 4.O SP3
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Yes you have. It's a virtual table, meaning you don't see this table in the Object Designer, but you can work with it in your C/AL Code.

    If you create a new form using the wizard, and use the lookup on Table Name, you see all Virtual Tables (at the end of the table list).
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • matttraxmatttrax Member Posts: 2,309
    Easy way is to go to File --> Database --> Sessions tab. Click the lookup arrow on Current Sessions.
  • tompynationtompynation Member Posts: 398
    and how do you know which session is active?

    Cause when i write this in code:


    MESSAGE('login type: ' + FORMAT(sessionRec."Login Type"));
    MESSAGE('login id: ' + FORMAT(sessionRec."User ID"));

    Then i get the message telling me that my login type is Database, and i get a blanco "login id"...

    But i'm signed in with windows authentication :?:

    FORGET THIS, STUPID QUESTION, i didnt saw the My session check ](*,)
Sign In or Register to comment.