Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
RanOuerg
Creator
Creator

Retreive all AD groups (list) from qlik sense

Hello,

I need to retrieve all the user IDs associated with their AD groups.

I have tried the following code:

I created a REST connection to the user table:

SET vURLGetUser = 'https://host/qrs/user';

LIB CONNECT TO '$(vAPIGetUser)';

RestConnectorMasterTableUsers:
SQL SELECT 
"id",
"userId",
"userDirectory",
"userDirectoryConnectorName",
    "GroupName",
    "Name"
    
FROM JSON (wrap on) "root";
 

However, the GroupName and Name columns are always empty.

I also attempted to connect Qlik Sense with Qlik CLI, but I couldn't retrieve group information using the command qlik qrs group ls --insecure (this command is not recognized).

Could you please help me correct my code? Is the "user" table the right one to get AD group information? Why am I getting the columns empty?

Additionally, if it is possible to retrieve AD groups with Qlik CLI, what is the correct command?

 

Thank you in advance.

Labels (5)
6 Replies
RanOuerg
Creator
Creator
Author

@Michael Tarallo

@ToniKautto 

Could you help me with this question please ?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I haven't tried this code for a while but I believe it will still work to load users and groups from AD. 

https://qlikviewcookbook.com/recipes/download-info/load-users-and-groups-from-active-directory/

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

RanOuerg
Creator
Creator
Author

@rwunderlich  Thank you for your response.

However, I have encountered an error:

The following error occurred: QVX_UNEXPECTED_END_OF_DATA:

Error location: ADGroups: LOAD name as GroupName, distinguishedName as GroupDN, info as GroupInfo

I've created the DC, changed the variables, but it still isn't working. Please note that I'm using my account to run this code.

Thank you in advance.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Have you tired uncommenting the "FIRST 1000" on line 11 of the Users tab?

-Rob

RanOuerg
Creator
Creator
Author

@rwunderlich 

Yes, it is already commented.

Do I need special access to retrieve this information?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I suggested uncommenting -- so the statement is active. 

-Rob