# Group based actions

It is possible to determine a user´s group membership in **mainConfigCheck()** or any module config check function. To do so copy the following link:

```c++
def mainConfigCheck(globalSettings, config) {
    var group = globalSettings["Group"];
	if (type_name(group)=="Map") {
	    gkScript.logInfo("Group: " + group["DisplayName"] + "(" + group["ObjectID"] + ")");

        if ("Offenbach" == group["DisplayName"]) {
            // user is in group named "Offenbach"
		}
        else if ("b865c07b49ab454bbd1f41c7bb466d27" == group["ObjectID"]) {
            // user is in group with id b865c07b49ab454bbd1f41c7bb466d27
        }
    } else {
        // User is unassigned
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.realmigrator.com/recipes/group_based_actions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
