Hello,
Thank you for the provided details. To achieve the desired, you need to create a report with a Directory object picker parameter. The report will execute the below script. The parameter will be used to select the user to output groups for. The report does not need a scope. For details on creating reports, see https://www.adaxes.com/help/CreateReport. In the script:
- $searchValue - Specifies the value group names should start with to be included into the report.
- $userParameterName - Specifies the name of the parameter used to select the user to generate the report for. The parameter name should include the param- prefix.
$searchValue = "XY" # TODO: modify me
$userParameterName = "param-User" # TODO: modify me
# Get user group membership
$userDN = $Context.GetParameterValue($userParameterName)
$user = $Context.BindToObjectByDN($userDN)
$groupGuidsBytes = $user.GetEx("adm-MemberOfGuid")
# Search parameters
$searcher = $Context.CreateGuidBasedSearcher($groupGuidsBytes)
$searcher.Criteria = New-AdmCriteria "group" -Expression {name -startsWith $searchValue}
# Generate report
$Context.Items.Add($searcher)