Getting a list of Users with Permission to use an object

lduddridge
Member Posts: 9
Hello all,
I am trying to write a bit of sql which returns a list of user logins who have permission to run a selected object, based the roles they belong to.
I have got so far but have just hit a brick wall. ](*,)
Here is what I have so far:
Now this would be ok if the User ID were populated, but in what I am seeing for our install it isnt, so all I have is an SID to work with.
Can anyone help me with where to go from here? is there a way to use this data to link in the sysusers table? or is there a different table in Navision that I could link to?
Cheers in advance
L Duddridge
I am trying to write a bit of sql which returns a list of user logins who have permission to run a selected object, based the roles they belong to.
I have got so far but have just hit a brick wall. ](*,)
Here is what I have so far:
select * from [Permission] P JOIN "Windows Access Control" WAC on P."Role ID" = WAC."Role ID" JOIN "Windows Login" WL on WAC."Login SID" = WL."SID" where [Object ID] = '[INSERTDESIREDIDHERE]'
Now this would be ok if the User ID were populated, but in what I am seeing for our install it isnt, so all I have is an SID to work with.
Can anyone help me with where to go from here? is there a way to use this data to link in the sysusers table? or is there a different table in Navision that I could link to?
Cheers in advance
L Duddridge
0
Comments
-
Well, table #2000000054 - Windows Login stores the corresponding SID and User ID, except you'll need to filter out any server precursors that might exist (Login= COMPANYNAME\UserID). Not sure if that is going to help you or not, but I hope so!0
-
The problem is I am already linking to "windows login" and the population of the User ID field is sparce, randomly some have been added whilst others are blank.
As an example I have a report which 3 people have access to, only one has a User ID filled out and the other 2 are some how linked, but I do not know how.0 -
Maybe try building it out from the Roles table, since that has the User ID and Role, then do a match that will put all of the permission lines (linked by Role ID) next to each role.0
-
Which table is this?
I've found a "user role" table, but have not found a User ID column in that.
We are running version 3.7 is that any help?0 -
You'll want to link the Table 2000000053- Windows Access Control with Table 2000000005- Permission. Use the Role ID field to connect the two tables. It might be huge, but it will give you a list of every object that a user ID has access to; maybe consider running a script on it to find/delete repeated object permissions across roles?0
-
ahhhhhh that table has a lookup script:
Lookup("SID - Account ID".ID WHERE (SID=FIELD(Login SID)))
beautiful.
If I cannot access that outside of Navision then I can hopefully stick a report to get the data!
Thanks fella.
\:D/0 -
Howdy...
Does anyone know what the raw SQL script is that would build the "SID - Acount ID" table...????
Thanks.
I'm not crazy !!! Just ask my toaster...
.0 -
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions