<saml:AttributeStatement> {% for attr in attributes %} <saml:Attribute {% if attr.FriendlyName %}FriendlyName="{{ attr.FriendlyName }}" {% endif %}Name="{{ attr.Name }}"> {% if attr.Value %} <saml:AttributeValue>{{ attr.Value }}</saml:AttributeValue> {% endif %} {% if attr.ValueArray %} {% for value in attr.ValueArray %} <saml:AttributeValue>{{ value }}</saml:AttributeValue> {% endfor %} {% endif %} </saml:Attribute> {% endfor %} </saml:AttributeStatement>