Forum Discussion
Rosieodonell
Mar 23, 2020Cirrus
Search for a certain string or value in a session variable, modify it, and create a new session variable
I need to create a certain variable from some information i pull from someone's AD group. I am basically query AD for a users "memberOf" and this is what i get: | CN=__P-GBL-Software-ComputerNa...
boneyard
May 01, 2020MVP
this should work, use it in a variable assign to whatever session variable you want.
set mem_fields [split [mcget {session.ad.last.attr.memberOf}] "|"]; foreach mem $mem_fields { if { $mem contains "Container" } { set found $mem } }; set grp_fields [split $found "-"]; return [lindex $grp_fields 2];
if not please check apm log for error or what result you do get.
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