In Microsoft Dynamics Nav 2013 and higher, Microsoft announced powershell cmdlets and its very easy to get all Nav users using powershell command Get-NAVServerUser.
Any idea how to get all users in Nav 2009 and lower where this is not supported? I need a way to get this users programmatically using powershell or c#.
*This post is locked for comments
You need to know the SQL database name, otherwise it's impossible to connect to him to read NAV user's configuration. Maybe you mean Company names? You can retrieve Companies in your NAV database by reading the Company and Company Information table.
Just to conclude: the only way to get all users is to log in to the database and read both windows and sql users? That would give me all users in the NAV?
Thats already helpful. Is there a way to know NAV database names? My goal is to make application where you give credentials, and it connect to the server and read users. It would be very helpful if I can find nav DB name, because adding it manually for each server is not a good solution (my clients have environments with 60 or more nav servers)
No local file DB is dismissed. Users details are stored on SQL now.
Is it always a case that users are stored in MS SQL database, or it can be other database type (local file or nav database)?
Get-NavServerUser returns information about all users created in the current Microsoft Dynamics NAV database. Do you want to retrieve these informations on NAV 2009? You could directly read the User SQL table (and maybe other related such as Windows Login).
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156