
ngh66 (ngh66) asked a question.
I am trying to create a mapping for github teams, where I use the expression language to check the group(s) that a user belongs in and assigning a github team to have the user added to. I get no Syntax error, but when testing my example, it yields no results.
Let's say we want to add all Okta users to a team named "everyone" on GitHub and all Okta users in the "Engineering" Okta group to "engineering" team on Github. My expression looks something like
isMemberOfGroup("Engineering") ? {"everyone", "engineering"} : {"everyone"}. I am trying to integrate with GitHub Teams, which is a SWA application and not a SAML application.
Testing this gives a null value, yet the user belongs to the Engineering group. I am stuck at this point and could do well with some help.
Simon

Hi Simon,
The error that you are getting is caused by the expression you selected.
isMemberOfGroup expects that you pass the groupId rather then the name
So to have that function you will need to use isMemberOfGroupName
https://developer.okta.com/docs/reference/okta-expression-language/#group-functions
Also being SWA I'm not sure those informations are being passed, given that swa functionality is just a fancy bookmark and it purpose is to inject the credentials and sign in the user. If you have provisioning then yeah that is different and should function.
Thank you Marius,
I have changed it to isMemberOfGroupName("Engineering") ? {"everyone", "engineering"} : {"everyone"} and now I get an error message saying "We found some errors. Please review the form and make corrections."
Sorry to bug, but this is somewhat confusing.
Hey Simon,
It's possible your situation is different but I had an issue before where I had to pass multiple values to an SP for group access.
The solution that worked for me was to pass over the values as arrays.
It would calculate if they qualified and if not pass over a blank entry in the array and then move onto the next condition.
So in your example, I think it would look something like this (forgive syntax errors):
Arrays.flatten(isMemberOfGroupName("Engineering")?"engineering",isMemberOfGroupName("Everyone")?"everyone":"everyone"
Hope that helps.