Hi Ashish, I got this working eventually, and I'll post the answer so that anyone else struggling with this doesn't go through the pain I did. Basically I got a lot of help from Craig (advanced tech support), and the following achieves my goal. Create a 'dummy' LDAP auth file and name it anything like LDAP-script.aut and place this file in the servcies folder. the contents of the file looks like this:- [Bootstrap] LibraryName=ldapauth.dll Enable=1 InitializationString=LDAP-Script [Settings] MaxConcurrent=1 Timeout=20 ConnectTimeout=25 QueryTimeout=10 WaitReconnect=2 MaxWaitReconnect=360 ;BindName=uid=<User-Name>, ou=sales, o=bigco.com LogLevel = 2 UpperCaseName = 0 PasswordCase=original PasswordFormat = 0 SSL = 0 MaxScriptSteps = 10000 ScriptTraceLevel = 2 ;FilterSpecialCharacterHandling = 0 ;ShutdownTimeout = 1 DelayConnect=1 [Server] s1= [Server/s1] Host=127.0.0.1 Port = 389 ;BindName=uid=admin, ou=sales, o=bigco.com ;BindPassword=secret [Failure] ;Accept=0 ;Profile=xyz ;FullName=Remote User [Request] %UserName = username ;Service-Type = ;%NASName = nameofnas %NASAddress = nasip [Response] ;Filter-Id = ;Session-Timeout = ;%FullName = ;%Password = Tunnel-Private-Group-ID=myvlan [Search/bogus] Base = o=bogus filter = uid=<username> Scope = 2 [ScriptTrace] attr = myvlan attr = nasip attr = username [Script] SbrWriteToLog("Script VLANAssign initialised"); var n = LdapVariables.Get("nasip"); var u = LdapVariables.Get("UserName"); if (u = "*@harry.com") { if (n == "10.1.1.1") var myvlan = LdapVariables.Add("myvlan","100"); } if (u = "*@harry.com") { if (n == "10.2.2.2") var myvlan = LdapVariables.Add("myvlan","200"); } if (n == "10.2.2.2.2") { if (u = "*@bob.com") var myvlan = LdapVariables.Add("myvlan","300"); } return SCRIPT_RET_SUCCESS; Restart SBR service LDAP-Script then appears as an auth type, make it an active type, and add TLS as a method. Move this Auth type up the list and make sure it is above any other EAP-TLS types you may have. I'm sure there are smarter ways of running the script, with else statements etc, so if any script monkey out there want to show me a better way, then please do. regards Andrew
... View more