Instead of reading the Section Access table from a manually created INLINE table, you can read it from any valid datasource for QV, such as an Excel file, a database, or... Active Directory itself . See this article on the Guerrilla BI blog on how to do this.
I'll leave the details of how to create the correct Section Access table to you.
One final IMPORTANT tip (see also page 247 - Chapter 27 'Section Access' - of the QVS reference manual): add one row to your Section Access table for the QlikView service account, with 'ACCESS'-level 'ADMIN', and with NO value in the reductionfield (in your case: 'SALESPERSONACCESS'). If you don't , then after the first reload the QlikView service account which is supposed to do the reloads won't be able to access the file anymore! The bit about leaving this field empty fooled me as well, but putting '*' in this field won't work.
Adding this row can be as easy as putting the following statement after the LOAD-statement which loads accounts from Active Directory:
CONCATENATE LOAD * INLINE [
ACCESS, NTNAME, DEPT, SALESPERSONACCESS
ADMIN, QLIKVIEW, ,
Martijn ter Schegget
PS: on the server the OsUser() call in the script will always return the QlikView service account, because it is evaluated during script reload, and the script reload is run with the QlikView service account credentials. When a user logs in, the reload has already finished, and the value for OsUser() in the script won't change.