Windows Authentication - User SID

Does anyone have a method to return the User SID from within Navision C/AL? I want to switch our system from standard Navision authentication over to Windows Authentication. We have written code that accesses tables “User” [2000000002] and “Member Of"[2000000003]. This code now needs to support “Windows Login” [2000000054] and “Windows Access Control” [2000000053]. The C/AL USERID function gave us the key to access the “User” and “Member Of" tables. However, “Windows Login” and “Windows Access Control” are keyed on the User’s SID. Does anyone know how to return the User SID?

Hi, take a look at Codeunit 418 Login Management, ValidateUserID function. Navision uses the virtual “SID - Account ID” table to convert a typical Navision User ID into a Windows SID.

Many Thanks Nelson. Just the Job!