Forum Discussion
APM Values
Is there any documentation on the different values and or good examples of what happens when the data is passed through utilizing the values.
IE: expr return string
session.logon.last.username
session.logon.first.username
what would these values return -
IE:
session.logon.last.username = expr { [mcget {session.ad.last.attr.sAMAccountName}]}
vs
session.logon.last.username = return { [mcget {session.ad.last.attr.sAMAccountName}]}
vs
session.logon.last.username = expr{ [string to lower [mcget {session.ad.last.attr.sAMAccountName}]]}
2 Replies
I certainly haven't seen much.
The first, would return the sAMAccountName AD attribute (if you had an AD query object in the VPE that returned sAMAccountName).
The second,I haven't tried using return, only ever expr, but i would assume the same as the above.
The third, would be the same as the first, just all lowercase.
HTH
Hi F51982,
assuming that
is set tosession.ad.last.attr.sAMAccountName
the following result can be expected.DOMAIN\bobmcget {session.ad.last.attr.sAMAccountName} = DOMAIN\bob string tolower [mcget {session.ad.last.attr.sAMAccountName}] = domain\bob expr { [mcget {session.ad.last.attr.sAMAccountName}] } = DOMAIN\bob expr { [string tolower [mcget {session.ad.last.attr.sAMAccountName}]] } = domain\bob return [mcget {session.ad.last.attr.sAMAccountName}] = DOMAIN\bob return [string tolower [mcget {session.ad.last.attr.sAMAccountName}]] = domain\bobThe difference of using a native
,command
orexpr { [command] }
is non-existent if you just fetch an existing variable while passing it to a new variable.return [command]Only the advanced variable assign actions are making the difference between those commands.
Example1:
expr { ( [mcget {session.ad.last.attr.sAMAccountName}] contains "domain\bob" ) or ( [mcget {session.ad.last.attr.sAMAccountName}] contains "domain\tom" ) }Result: The above example will return the value
if bob or tom is loggin in and1
for everyone else.0Example2:
if { ( [mcget {session.ad.last.attr.sAMAccountName}] contains "domain\bob" ) or ( [mcget {session.ad.last.attr.sAMAccountName}] contains "domain\tom" ) } then { return a ; } else { return b ; } ;Result: The above example will return the value
if bob or tom is loggin in anda
for everyone else.bExample3:
set user [mcget {session.ad.last.attr.sAMAccountName}] ; if { $user starts_with "DOMAIN\\" } then { return "DOMAIN2\\[lindex [split $user "\\"] 1]" ; } else { return $user ; } ;Result: The above example will return the
while rewritingsAMAccountName
toDOMAIN\
.DOMAIN2\Cheers, Kai
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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