Integrating with Navision SQL tables - Application Roles/Security

I am writing a .net application to handle an area of our business which NAV could not. The application will read data from some of the Navision tables (but write back to staging tables which are then interfaced into NAV), but looking at the tables the security is setup using Application Roles.

Our users are setup as Windows logins and my application will also use Windows logins but I need to understand how Navision goes from the Windows login to a SQL Application Role. I understand how to get from the Windows login to the permissions on the objects (via the Navision roles), but how do I then get to Application Roles?

Any help would be appreciated.



What ever you can do with SQL logins, you can do with Windows logins. Please explain more abt ur problem.

Sorry i forgot add, What ever you can do with SQL logins, you can do with Windows logins and in same way.

Sorry, I didn’t fully understood your question. You want to have the same Navision security permissions applied to SQL Server tables?


Thanks for your replies. I realise it was not clear from my initial question what I was asking.

I basically want to get from a SID to an Application Role in Navision so I can access the Navision tables in SQL to run queries. I have now found out how to do this so my problem is almost resolved, just need to figure out how Application Roles work, but that shouldn’t be too difficult.

Thanks for your help.

PS. I could use any advice you have on finding the Application Role password? I can use the sp_setapprole stored procedure and have the Application Role for the logged in user but need the password?