+xThis is done automatically if you're using the SAML high level API which is the recommended approach. When you call SAMLIdentityProvider.InitiateSSO or SAMLIdentityProvider.SendSSO, the xsi:type and namespace declarations are included automatically with the SAML attribute value. The example SAML assertion above was generated using the high-level API. If you're generating a SAML assertion but these fields are not included, please include a section of your code. Hey, Thanks a lot. In my case i had to use IdentityProvider.SendSAMLResponseByHTTPPost(Response, ssoState.assertionConsumerServiceURL, samlResponseXml, ssoState.relayState); Doesn't this work out? I tried the below scenario which amazingly worked out, do let me know if this is the correct way? (highlighted change)AttributeStatement attributeStatement = new AttributeStatement(); SAMLAttribute samlattribute = new SAMLAttribute(p.Name, SAMLIdentifiers.AttributeNameFormats.Unspecified, null, "xs:string", Convert.ToString(p.GetValue(profile, null))); attributeStatement.Attributes.Add(samlattribute); samlAssertion.Statements.Add(attributeStatement);
|