Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
capriconuser
Creator
Creator

Qliksense section access

I am trying to implement section access in hub .. so I do this 

first I did this 

 

 

Section Access;
Access_Table:
LOAD * INLINE [
    ACCESS,  NTNAME,  AuthKey
    ADMIN, administrator,  *
    ADMIN, testuser_1,  *
    ADMIN, IL\SA_SCHEDULER,  *
];
Concatenate(Access_Table)
LOAD
    ACCESS,
    NTNAME,
    AuthKey
FROM [lib://downloads (win1_administrator)/User_Access.xlsx]
(ooxml, embedded labels, table is Sheet1);

Section Application;

 

 

 

User_Access table 

 

 

ACCESS	NTNAME	            AuthKey
USER	W-AMKU1\jn	      101
USER	W-AMKU1\testuser_1	102
USER	W-AMKU1\testuser_2	103

 

 

and in sales tab 

 

 

Sales_Master:

LOAD
    ProductID,
    Country,
    Geography,
    Sales,
    Pick(Match(Country,'India','UK','USA','Canada','Japan','Austria'),101,102,103) as AuthKey
FROM [lib://downloads (w_administrator)/SALES.xlsx]
(ooxml, embedded labels, table is SALES);
sales table 

Product      Country	   Geography	      Sales
101	      India	     APAC	       10002
102	      Japan	     APAC	       2000
103	      UK	    AMEC	      3300
104	      Austria	    AMEC	      4000
105	      USA	    AMER	      7000
106	      Canada	     AMER	      3000

 

 

 

and in emp tab

 

 

EMP:

LOAD
    EMPID,
    ProductID
FROM [lib://downloads (w_administrator)/EMP.xlsx]
(ooxml, embedded labels, table is EMP);
Emp table 

EMPID	ProductID
E120	101
E130	102
E140	102
E150	103
E160	104

 

 

but when I login through testuser_1 this shows an error

 

capriconuser_0-1617178502831.png

 

how I resolve this ?

 

Labels (3)
1 Solution

Accepted Solutions
gmenoutis
Partner
Partner

Users indeed must have access to a stream/app/sheet/object to see it, but they *also* need a license.

View solution in original post

14 Replies
gmenoutis
Partner
Partner

You seem to be coming from the Qlikview side, no? "NTNAME" is not applicable for Qlik Sense; try "USERID" instead as a field name.

capriconuser
Creator
Creator
Author

yes i used  qliksense ..ok now i do this @gmenoutis 

 

Section Access;
Access_Table:
LOAD * INLINE [
    ACCESS,  UserID,  AuthKey
    ADMIN, administrator,  *
    ADMIN, testuser_1,  *
    ADMIN, IL\SA_SCHEDULER,  *
];
Concatenate(Access_Table)
LOAD
    ACCESS,
    UserID,
    AuthKey
FROM [lib://downloads (win1_administrator)/User_Access.xlsx]
(ooxml, embedded labels, table is Sheet1);

Section Application;

 

 

But this still shows same error

gmenoutis
Partner
Partner

In the section access table, all field names AND values must be in capitals. Change UserId to USERID,  testuser_1 to TESTUSER_1, AuthKey to AUTHKEY and so on. Obviously do the same to the connecting fields of data tables like AUTHKEY on Sales.

capriconuser
Creator
Creator
Author

still same error when i click on application and when I log in through testuser_1 @gmenoutis 

gmenoutis
Partner
Partner

Hmm. Maybe the domain is missing? Generally you can debug this by temporarily disabling section access, going in the app, and adding a KPI with =OSuser() so you can see the username and the domain(shown as user directory), then put it accordingly. I would make a guess that the directory is local on the machine IL so you could try IL\TESTUSER_1.

capriconuser
Creator
Creator
Author

IN qmc i have this @gmenoutis 

capriconuser_1-1617180903348.png

 

and when I use KPI =osuser then I found this in OS USER

capriconuser_2-1617181047623.png

currently i am log in through admin but when i try to login in through test_user1 and then click on application then this shows an error 

 

gmenoutis
Partner
Partner

You have to use W-AMKU1\ADMINISTRATOR and W-AMKU1\TESTUSER_1 respectively. 

capriconuser
Creator
Creator
Author

@gmenoutis   YES I used that both in script and in excel .. but still shows the same error 

gmenoutis
Partner
Partner

Strange that administrator works but test user not. Does the testuser have a licence allocated?