Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

LDAP Access - Member Of

Hi Folks

I have figured out how to access LDAP, however, I am having trouble getting hold of the MemberOf values, the following query

ldap_Groups:

SQL
SELECT memberOf
FROM '$(vLDAP)' WHERE objectClass='user' AND SAMAccountName='$(vUserName)';


Returns an error as shown below (always a favourite of mine when an error message states SQL Error: No Error, provides so much information!), I am suspecting that I might need to do something special with this as the contents of memberOf field is quite large.

Anybody have any clues as to what I would need to do????



Any help greatly appreciated.

51 Replies
Anonymous
Not applicable
Author

Any update on getting the macro to run with system access from Publisher?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The only workaround I found was to schedule the reload as a publisher external task -- executing  QlikviewDistributionService.exe.

-Rob

Anonymous
Not applicable
Author

I've never set up such a task. Can you post the steps necessary?

Anonymous
Not applicable
Author

Worked it out and it's running as a Supporting Task. But it still doesn't run the macro. Works fine running interactively in Desktop client.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Ok, I went back and checked the server where I got it working. I recall now that I had to use qv.exe instead of QlikviewDistributionService.exe -- because of the requirement for the /NoScurity switch. Here's my external task cmdline I used:

cmd.exe /C  "D:\program files\qlikview\qv.exe" /r /NoSecurity Masterdata\MasterActiveDirectory.qvw

-Rob

Anonymous
Not applicable
Author

We have success! The /NoSecurity switch did it. The "CMD /C" part not needed.

Not applicable
Author

Rob,

Thanx for your code! However, as the QDS doesn't run macro's, it is not possible to schedule/reload the cookbook-script ("Load from Active Directory - Users and Groups")  on the publisher.

I have found a way to avoid using a macro. To get the members of a group, I use:

//*************************************** Get all Members per (loaded) group ********************************************

LET arg= NoOfRows('GroupTable');

For X = 0 to arg
LET Group = peek('GroupDN', $(X), 'GroupTable');
GroupMembers:

load distinguishedName as UserDN, '$(Group)' as GroupDN;

SELECT distinguishedName FROM 'LDAP://$(RootDse)' WHERE MemberOf='$(Group)';
next

Not applicable
Author

Rob,

Thanx for your code! However, as the QDS doesn't run macro's, it is not possible to schedule/reload the cookbook-script ("Load from Active Directory - Users and Groups")  on the publisher.

I have found a way to avoid using a macro. To get the members of a group, I use:

//*************************************** Get all Members per (loaded) group ********************************************

LET arg= NoOfRows('GroupTable');

For X = 0 to arg
LET Group = peek('GroupDN', $(X), 'GroupTable');
GroupMembers:

load distinguishedName as UserDN, '$(Group)' as GroupDN;

SELECT distinguishedName FROM 'LDAP://$(RootDse)' WHERE MemberOf='$(Group)';
next

Not applicable
Author

Rob,

Thanx for your code! However, as the QDS doesn't run macro's, it is not possible to schedule/reload the cookbook-script ("Load from Active Directory - Users and Groups")  on the publisher.

I have found a way to avoid using a macro. To get the members of a group, I use:

//*************************************** Get all Members per (loaded) group ********************************************LET arg= NoOfRows('GroupTable');
For X = 0 to arg
LET Group = peek('GroupDN', $(X), 'GroupTable');

GroupMembers:load distinguishedName as UserDN, '$(Group)' as GroupDN;SELECT distinguishedName
FROM 'LDAP://$(RootDse)' WHERE MemberOf='$(Group)';
next

Not applicable
Author

Rob,

Thanx for your code! However, as the QDS doesn't run macro's, it is not possible to schedule/reload the cookbook-script ("Load from Active Directory - Users and Groups")  on the publisher.

I have found a way to avoid using a macro. To get the members of a group, I use:

//*************************************** Get all Members per (loaded) group ********************************************

LET arg= NoOfRows('GroupTable');
For X = 0 to arg
LET Group = peek('GroupDN', $(X), 'GroupTable');

GroupMembers:load distinguishedName as UserDN, '$(Group)' as GroupDN;SELECT distinguishedName
FROM 'LDAP://$(RootDse)' WHERE MemberOf='$(Group)';
next