In Federated Site hierarchy Can't find camera groups inside child sites ?

We have a setup of federated Site hierarchy where we have added few child sites to central site.

Using following code we are trying to find camera under the camera group

  List<Item> serverItems = serverItems = Configuration.Instance.GetItems(ItemHierarchy.UserDefined);
                    foreach (var item in serverItems)
                    {
                        Log.Info("GetTreeView " + item.Name);
                        if (item.FQID.Kind == Kind.Server)
                        {
                            var cameraGroup = item.GetChildren()[0].GetChildren();
                            foreach (var group in cameraGroup)
                            {
                                Log.Info("GetTreeView cameraGroup " + group.Name);
                                queue.Enqueue(group);
                            }
                        }
                    }

Here item.GetChildren() has zero items. But same code works inside smart client plugin. Not working as component integration.

if i use SystemDefined instead of UserDefined it finds system groups and cameras inside system groups. But i need camera groups.

Here management Server is 2020R2 and smart client is 2022R2

How I can get camera groups in Federated Site hierarchy pls help?

In the Smart Client plugin the Smart Client is responsible for picking up the child sites.

In the standalone environment there are options to include or exclude child sites.

For a practical example I recommend that you explore the Multi-Site Viewer sample. https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/multisiteviewer/readme.html&tree=tree_2.html