Jump to content


  • 0
Steve0

Create 2 collections from AD group and return only the users/machines in both collections

Question

I have a requirement to create 2 collections from AD groups and return only the users/machines that are in both.

I have tried something like the following:-

SELECT 

...

WHERE ResourceID IN (SELECT ResourceID FROM SMS_R_User where SMS_R_User.SecurityGroupName = <GroupA>) 

AND ResourceID IN (SELECT ResourceID FROM SMS_R_User where SMS_R_User.SecurityGroupName = <GroupB>)

 

But if a user is in both groups the result is 0 not the expected result

 

e.g

Collection from ADGroup1 = 12345

Collection from ADGroup2 = 34567

Collection items in ADGroup1 and ADGroup2 = 345

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.