Forum Discussion
dp_119903
May 18, 2018Cirrostratus
Assign a variable based on AD query
I think I have this figured it but was hoping to get a sanity check.
I have an access policy that is querying AD. Later on I am sending an email to the user but there are two potential email field...
May 18, 2018
Looks good to me!
if { ( [mcget {session.ad.last.attr.f5ProfileEmailAddress}] contains “@“)} {
return ([mcget {session.ad.last.attr.f5ProfileEmailAddress }])
}
else {
return ([mcget {session.ad.last.attr.email}])
}
For some good examples, check these code snippets from Stanislas:
https://devcentral.f5.com/codeshare/apm-variable-assign-examples-1107
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