Thank you so much Alan for pointing out the mistake & suggesting the solution. Using: if (control:Ldap-UserDN =~ /^[^,]+,OU=([^,]+),/) *solved this issue.* Still trying to become more familiar with attributes and learning. In my understanding there are different attributes list as :request, reply, control, proxy-request, proxy-reply, outer.request, outer.reply, etc. Is there any way to see what attributes request list contains ; or reply list contains, etc. When searching I see the following FreeRadius site lists the attribute lists: http://freeradius.org/rfc/attributes.html But, is there any way to know what attributes is contained by what list. For example: Ldap-UserDN is inside control attribute list. How to figure out this? (It is not in the attributes list mentioned in above site) Is there any way to find it that I am unaware of ? Thanks -- View this message in context: http://freeradius.1045715.n5.nabble.com/How-to-return-Filter-ID-attribute-va... Sent from the FreeRadius - User mailing list archive at Nabble.com.