diff --git a/cas_attributes.info b/cas_attributes.info
index 25602b8..5df0850 100644
--- a/cas_attributes.info
+++ b/cas_attributes.info
@@ -4,6 +4,7 @@ core = 7.x
 package = Central Authentication Service
 
 dependencies[] = cas
+dependencies[] = token
 
 files[] = cas_attributes.test
 
diff --git a/cas_attributes.tokens.inc b/cas_attributes.tokens.inc
index 5bb085c..a4573ad 100644
--- a/cas_attributes.tokens.inc
+++ b/cas_attributes.tokens.inc
@@ -32,13 +32,21 @@ function cas_attributes_tokens($type, $tokens, array $data = array(), array $opt
     if ($attribute_tokens = token_find_with_prefix($tokens, 'attribute')) {
       $attribute = array_change_key_case(cas_phpcas_attributes($cas));
       foreach ($attribute_tokens as $name => $original) {
+        // If there are no options specified have it return the first value.
+        if (strpos($name, ':') === FALSE) {
+          $name .= ':first';
+        }
+
+        // Break out the token into attributes and the options for them.
+        list($name, $token) = explode(':', $name, 2);
+
         $name = drupal_strtolower($name);
         if (isset($attribute[$name])) {
           $value = $attribute[$name];
-          if (is_array($value)) {
-            $value = $value[0];
+          if (!is_array($value)) {
+            $value = array($value);
           }
-          $replacements[$original] = $sanitize ? check_plain($value) : $value;
+          $replacements += token_generate('array', array($token => $original), array('array' => $value), $options);
         }
         elseif ($name == '?') {
           $keys = array_keys($attribute);
