---
title: Using virtual static groups
description: Virtual static groups make it possible to get the efficiency and ease of management of a dynamic group while allowing clients to interact with them as a static group.
component: pingdirectory
version: 11.0
page_id: pingdirectory:pingdirectory_server_administration_guide:pd_ds_use_virtual_static_groups
canonical_url: https://docs.pingidentity.com/pingdirectory/11.0/pingdirectory_server_administration_guide/pd_ds_use_virtual_static_groups.html
revdate: September 13, 2023
section_ids:
  about-this-task: About this task
  steps: Steps
  example: Example:
  example-2: Example:
---

# Using virtual static groups

Virtual static groups make it possible to get the efficiency and ease of management of a dynamic group while allowing clients to interact with them as a static group.

## About this task

Static groups can be easier to interact with than dynamic groups, but large static groups can be expensive to manage and require a large amount of memory to hold in the internal group cache. The PingDirectory server provides a third type of group: a virtual static group, which references another group and provides access to the members of that group as if it was a static group.

## Steps

* To create a virtual static group, create an entry that has a structural object class of either `groupOfNames` or `groupOfUniqueNames` and an auxiliary class of `ds-virtual-static-group`.

  |   |                                                                                                                                                                                                                                                                                  |
  | - | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  |   | It should include a `ds-target-group-dn` attribute, whose value is the group from which the virtual static group should obtain its members.You must also enable a virtual attribute that allows the `member` attribute to be generated based on membership for the target group. |

  ### Example:

  This example creates a virtual static group that exposes the members of the `cn=Sales Group,ou=Groups,dc=example,dc=com` dynamic group as if it were a static group.

  ```
  dn: cn=Virtual Static Sales Group,ou=Groups,dc=example,dc=com
  objectClass: top
  objectClass: groupOfNames
  objectClass: ds-virtual-static-group
  cn: Virtual Static Sales Group
  ds-target-group-dn: cn=Sales Group,ou=Groups,dc=example,dc=com
  ```

* To enable a configuration object for the virtual static member attribute, use the `set-virtual-attribute-prop` option with `dsconfig`.

  ### Example:

  ```shell
  $ bin/dsconfig set-virtual-attribute-prop --name "Virtual Static member" \
    --set enabled:true
  ```

  |   |                                                                                                                                                                                                                                                                              |
  | - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  |   | A configuration object for this virtual attribute is in the server configuration but is disabled by default.If you want to use virtual static groups with the `groupOfUniqueNames` object class, enable the `Virtual Static uniqueMember` virtual attribute in the same way. |
