Forum Discussion
Shane_Hickey_19
Apr 07, 2016Nimbostratus
Custom session variable for filtered memberOf AD attribute
Can someone give me a pointer as to the best way to create a custom session variable that returns all AD groups that start with a certain string? I'm not sure if the best way to do it is with an LDA...
Josiah_39459
Apr 07, 2016Historic F5 Account
Since you already have the memberOf session variable and this is a subset. I'd just run the split command on memberOf and iterate through the results to make your new list of F5- only ones.
https://www.tcl.tk/man/tcl8.4/TclCmd/split.htm
- brad_11480May 25, 2017Nimbostratus
Yes, perfect...
set list "|"; foreach element [split [mcget {session.ad.last.attr.memberOf}] "|"] { if { $element contains "XYZ"}{ append list "$element|"; } } return $list;
Returns all groups that contain the string "XYZ" in an abbreviated list.
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