Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Masajnik
Contributor II
Contributor II

Server

Do they know something about to get server information, for example, windows user group/ users etc, most important for me is name windows user group

 

Thank you!!!!!

5 Replies
atoz1158
Creator II
Creator II

Hi

 

I suggest you have a look at the Qlikview Cookbook with regards to getting data from the Active Directory.

https://qlikviewcookbook.com/recipes/download-tag/active-directory/

Regards

Adrian

 

Masajnik
Contributor II
Contributor II
Author

Thank! I have a question, I have to put the domain of server?

For the monent it is not working

RootDse = server domain

select
// Add addtional Fields as required
name, distinguishedName // Fields to select
FROM 'LDAP://$(RootDse)' WHERE objectCategory='person'
AND name>'$(arg)';

Masajnik
Contributor II
Contributor II
Author

It is working but the APP give that error:

 

QVX_UNEXPECTED_END_OF_DATA:
ADUsers:

LOAD DISTINCT

name as UserName,
distinguishedName as UserDN

atoz1158
Creator II
Creator II

Hi

 

I got that error to start with and found it was because the number of records was too large, I think there is some sort of buffer (size unknown).

 

I ended up getting the users back in chunks by putting select in a loop getting a single letter at a time see below.

set values='A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z';
let valuecount = SubStringCount(values,',');
//Loop to load records for each value count from the AD database.
for i = 1 to valuecount + 1
let value = subfield(values,',', i) & '*';
[AD_Users]:
LOAD mail AS EMailAddress,
employeeID AS EmployeeNumber,
distinguishedName AS UserDN
WHERE EXISTS(employeeID);
sql select mail,
employeeID,
distinguishedName,
from '$(ADDatabase)'
where objectClass = 'User' and objectCategory = 'Person' AND sAMAccountName = '$(value)' ;
next

Regards

Adrian

Masajnik
Contributor II
Contributor II
Author

Buen dia, gracias por tu respuesta!! pero  lo que estoy necesitando es el grupo de windows que esta relacionado al archivo qvw, eso se puede hacer ?