Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

SQL query for user ID, roles and company

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

From this post I got some information, but not all that I need. https://forum.mibuso.com/discussion/23627/how-to-get-windows-login

So, I understand that the windows logins are stored in Windows Login table. But according to the post above, if you are not synced with AD and running in "offline mode" then all you will see in the table is SIDs.  (Side note, how do I check this synchronization with AD?  Where in NAV do I find configuration for that?)

So, our table only has SIDs.   I want to see these logins as actual userId's - and I want to see them using SQL. 

I also want to see which roles each userId has, and whether that role assignment is for specific companies. I cannot find which table the role assignments are stored in.

Is this all possible purely with SQL?

*This post is locked for comments

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: SQL query for user ID, roles and company

    Yes, you can easily join Windows Login and Access Control tables via a SQL query.

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans