Forum Discussion
Thrillseeker_12
Cirrus
Jan 23, 2017How to get group name CN from session.ad.last.attr.memberOf ?
Hi all,
When I use the session.ad.last.attr.memberOf variable the group values are like:
| CN=webaccess,CN=Users,DC=mydomain,DC=com |
The question is how can I strip the first group na...
Stanislas_Piro2
Cumulonimbus
Jan 24, 2017Hi,
you can use this code:
session.ad.last.attr.memberOfLite
if { [info exists "groups"] }{unset groups;};
foreach value [mcget {session.ad.last.attr.memberOf}] {
regex {(CN=[^,]+)} $value CNFull CNValue;
lappend groups $CNValue;
unset CNFull;
unset CNValue;
};
return $groupsHelp guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
