to a very simple implementation. No filtering for an application/client ID, no resolving of existing data and mapping, just trying to hard code a single custom SAML attribute for testing.
I have a single application using SAML using the saml2 web add-on. I have tried both mapping this value and not mapping the value in the bindings section:
Just to make sure, in your scenario, your Auth0 Tenant acts as the IdP for the SAML connection used right?
If that is correct, by simply using the code you provided inside a Post-Login Action the custom attribute should be visible. I have tested this out on my end and when I decoded the response via the SamlTool, the attribute was visible:
Yes, I am using Auth0 as the IdP. I do agree that it should work, but it’s not. My service provider has similar logging where I see all the attributes from the response and there is no difference in that result or that tool, the custom claim just isn’t there.
@nik.baleca Were you using the SAML2 Web App add on during your test or some other setup? If so, did you use this value in the mappings section or not? Looking to find any difference in what you tested vs what i’m doing.
Yes, I am using the SAML2 Web App Addon. I have not changed any mappings in the addon’s setting page, I have only added the same code as you did in the Post-Login Action:
Just to be sure, are you able to preview the SAML Attributes during the login process on the SP’s side or are you expecting for the attribute to be displayed on the returned user profile?
By any chance, have you tried to retrieve the SAML Response from the browser’s Network Activity and decode it using the provided website?
I am only expecting these to show up in the response, not the user profile.
I can extract the response from the service provider logs or web traffic both are identical and missing this attribute.
I am using just the default configuration with updated URL’s from the add on example. Is there something here that could be causing a difference in behavior than your experience?
By any chance, even if the custom attribute is not forwarded in the SAML Response, is it by any chance available in the user’s RAW JSON under User Management → Users → Select SAML User → RAW JSON?
As far as I have checked on the tenant, the configuration of the SAML Addon looks fine, however, the only issues that I noticed are:
The action in which you add the attribute does not appear to be bound, I can see that it has been deployed but not bound to any trigger.
In similar fashion, checking your logs for any login using the SAML connection, the successful logins do not have any Action Executions logs. Whenever a successful login is performed and there is an action which triggers, you should have different tabs: RAW Data/Context Data/Actions Executions
Could you let me know that you have bounded the action and are still unable to see the attribute? Otherwise, once you have performed another login using the SAML connection, I will check the tenant again and the logs.
Thank you for the pointer. I thought I had already created the trigger when I made the action but apparently I didn’t. The action is now running and I am seeing the attribute.