I was having a similar issue and that worked for me as well. I wanted to assign Portal Access to all users unless they are in a specific AD Group.
I had an issue with spaces in the string. I had the ability to re-name the AD Group and removed spaces, but I am sure there is a way to make it work with spaces.
expr { [string match -nocase * AD Group Name * [mcget {session.ad.last.attr.memberOf}]] == 0 }
expr { [string match -nocase * "AD Group Name" * [mcget {session.ad.last.attr.memberOf}]] == 0 }
- didnt work with spaces and quotes
expr { [string match -nocase * ADGroupName * [mcget {session.ad.last.attr.memberOf}]] == 0 }
- Since I was able to change the AD name, worked without spaces
If somebody would be able to provide an answer for getting this to work with spaces, that will be beneficial since changing the name or value isn't always possible.