Empty Active Directory Groups do not Show up for SharePoint 2007 Audiences

I ran into an interesting issue at a customer site.  They had dozens of newly created Active Directory groups, but only two of them were showing up when they wanted to create a new audience or specify one of the groups as a target for a list item.  It turns out that SharePoint only shows Active Directory groups that contain users who have a profile imported into SharePoint.  There's a simple work around: add a user to the group who also has a SharePoint user profile.  This is a little inconvenient, since you can't set up audiences or target content using Active Directory groups before you have members in the group, and you may not know who should be members of the group at the time you're setting them up.

The trick is to do a full user profile import before you try to use groups in audiences.  I've also seen some references on other sites that you may need to do 2 or 3 full profile imports before they start working, but we found that one full import did the trick.  However, note that if you change group membership, you need to do a profile import again to see those changes.

So, to make a long story short, here's what we found works:

  1. Create your Active Directory Groups
  2. Add at least one user to each group (and make sure that one user will have their user profile imported)
  3. Run a full user profile import in SharePoint
  4. Create your audiences (you should now see all the groups that have members with profiles)

In development and testing environments, you typically end up doing full profile imports quite a bit since when you change the group membership, you need to do a profile import.  In production, make sure you're doing profile imports often enough to catch group membership changes in a timely manner.