title: Reading SAML Attributes from SAML Token
body: <p>I am loading SAML Token from XML file. </p>
  
  <pre><code>string certificatePath = @"D:\Projects\SAMLDemo\Server.pfx";
  X509Certificate2 cert = new X509Certificate2(certificatePath, "shani");
  
  string samlFilePath = @"D:\Projects\SAMLDemo\saml.xml";
  XmlReader reader = XmlReader.Create(samlFilePath);
  
  List&lt;SecurityToken&gt; tokens = new List&lt;SecurityToken&gt;();
  tokens.Add(new X509SecurityToken(cert));
  
  SecurityTokenResolver outOfBandTokenResolver = SecurityTokenResolver.CreateDefaultSecurityTokenResolver(new ReadOnlyCollection&lt;SecurityToken&gt;(tokens), true);
  SecurityToken securityToken = WSSecurityTokenSerializer.DefaultInstance.ReadToken(reader, outOfBandTokenResolver);
  
  SamlSecurityToken deserializedSaml = securityToken as SamlSecurityToken;
  </code></pre>
  
  <p>How can I read the SAML attributes from deserializedSaml ? </p>
  
  <p>I need string values for the attributes.  </p>