How to get the saml2 attribute statement object with New York MultiSSOv2

Sebastian R_
Kilo Sage

In the old version of SAML2 I could access the attribute statements with the method getAssertionAttrValueByNameOrFriendlyName in SAML2_update1. In New York they completely reworked the design. I have now the script include SAML2_internal which uses an internal class SNC.GlideSAML2 which probably stores the information. 

Does anyone knows out to get the attribute statements from this class?

 

There was an old question which isn´t available anymore because I cannot access the following question anymore: https://community.servicenow.com/community?id=community_question&sys_id=c2a9b334db6c0894d82ffb2439961908

find_real_file.png

1 ACCEPTED SOLUTION

Sebastian R_
Kilo Sage

Found the answer myself.

If you are working in the script include MultiSSOv2_SAML2_custom you can use the following to get a attribute/all attributes.

// implemented in parent class MultiSSOv2_SAML2_internal.getAttributesMap
// Returns a java hash map which can be iterated through
var oAttr = this.getAttributesMap();
// Get the auth level from SAML Response Attributes
var sLevel = oAttr.get("auth_level");

View solution in original post

5 REPLIES 5

Hi,

Thanks for your reply with this, the update we needed to make was to the user provisioning Script Include, which was moved to backend ServiceNow in the NY version update. They said to continue using the Group Claim change, the plugin would need to be reverted to the previous version (basically set a sys_property to false)