Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Active Directory data in QVW

Hi all,

I'm looking for a way of retrieving the Active Directory data and show this data in a QVW ...

Anyone got suggestions how to get the AD data??

thx

Anita

19 Replies
Not applicable
Author

Amnon

Have you copied the GroupMembers function from my sample into your application? This is a function in the macro code so you can just go in there and copy it, then paste it into your own app.

Cheers,

Not applicable
Author

Hi Nigel,

1. I did not copied the function. Where i can find it?

2. I have tried to load the QVS file with "include" command, but, i can not see anything happened.

3. what is the way to load QVS file?

4. The only way to edit the QVS file is with an external editor?

Thank's again,

Amnon

Not applicable
Author

Amnon

If you open my sample application then hit CTRL-M you will go to the Macro Scripts page, here you'll see the GroupMembers function which should be copied into your application. Actually I noticed that I included only a QVS file, so I've included the function code here so you can copy/paste it into your own app:

REM *************************************************
REM Get members of an Active Directory Group.
REM Returns a string of distinguishedNames seperated by ";".
REM Parameter is the distinguishedName of a Group.
REM This function requires System Access!
REM *************************************************
Function GroupMembers(DN)
Set objItem = GetObject("LDAP://" & DN)
strmember = objItem.GetEx("member")
ret = ""
For Each Item in strmember
ret = ret & Item & ";"
Next
GroupMembers = Left(ret, Len(ret)-1) ' Drop trailing semicolon
End Function


You don't need to use QVS files at all, you can simply copy the text from my QVS.TXT file and then paste this into your load script, but if you want to use it as a QVS then you should add something like the following to your load script:

$(Include = \QLIKVIEW\QVS\LDAPDataLoad.QVS)


If you use QVS files then yes, the only way to edit those is with an external editor, the only reason I know of to make use of QVS files is if you have aspects of load scripts that are duplicated across many QVW files, then they can be managed in a central location.

Not applicable
Author

Hi Nigel,

Thank you again. It was very helpful.

I will be very grateful if you will send me the link to your sample applications.

Amnon

jaymerry
Creator
Creator

Hello,

Thank your for these script.

Unfortunately, I don't have any data for the GroupUser field, even with GroupMembers function. So, my tables are not linked..

Have you got any idea ?

Thanks for your help,

Regards,

Jaymerry

Not applicable
Author

Same issue as Jaymerry.  Any guidance?

Cheers,

Sue

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Attached is an updated example that doesn't require the macro to get the group members. The improvement was provided by Bram in this thread

http://community.qlik.com/message/239460#239460

hirenp0904
Contributor
Contributor

Hi Rob,

Can you tell me how to modify the connect string with credentials of service account to connect to AD instead of logged in user?

qlikviewforum
Creator II
Creator II

Hi,

The QVW which tries to load the data from LDAP loads only the partial data frequently. We are unable to find the root cause of the issue as the QVW doesn't fails but it loads only the partial data.Can someone please help us to identify the root cause of the issue. It has been happening from quite a long time but we didn't succeed in finding the root cause of the issue. Hope someone can help us for the same.

Regards,

qvforum

christerlindber
Contributor
Contributor

Hi!

When I added:

FROM 'LDAP://$(RootDse)' 

WHERE

objectCategory='user' and

name > '$(arg)'

order by name asc ;

...I got the full list. It was an issue before I added "order by name asc ;" in the end.

Regards

Christer