I see one possible solution, though. If you can establish a static mappings like "SP1_entityid -> external_IDP1, SP2_entityid -> external_IDP2, SP3_entityid -> external_IDP3, etc", then you could modify the `passport_saml` script, making it to retrieve entityid of the SP, check it against the mapping table, and use the external IDP assigned to it.
Gluu's IDP component passes entityid of calling SP in "entityId" custom parameter to oxAuth. It can be retrieved from inside a custom script with something like this:
```
identity = CdiUtil.bean(Identity)
sessionId = identity.getSessionId()
...
sessionAttributes = identity.getSessionId().getSessionAttributes()
entityId = sessionAttributes.get("entityId")
...
```
Community Support doesn't cover scripting questions, though, so we won't be able to assist you with this further than that.