
ScottT.50751 (Customer) asked a question.
We're integrating an application that accepts a role attribute in the SAML assertions. For a sub group of users within the application, the system administrator needs to be able to still manually assign the roles instead of being passed in the SAML. This is causing an issue since the application returns an error if the attribute is empty for this sub group.
I've tried setting the value to null but it's the same as setting an empty string, the attribute is still be sent. I've also looked at the SAML hook but it looks like there are only add and modify operations.
SAML assertion inline hook reference | Okta Developer
Is there a way to remove a SAML attribute completely if the value is empty/null?

I've solved this using SAML inline hook and Okta Workflows. I had to remove the attribute definition from the SAML app configuration, and then I'm dynamically adding the attribute when needed using the SAML assertion inline hook: https://developer.okta.com/docs/reference/saml-hook/
I can still use the custom attribute from the application profile by looking up the application profile in the workflow executed by the SAML hook.