title: Return a list of all Active Directory groups a user belongs to in string[ ]
body: <p>I need to return all Active Directory groups a user belongs to but in string[ ], so I can use the result in Generic Principal.</p>
  
  <p>I am not sure if to cast results? Please help!</p>
  
  <pre><code>string[] roles = new string[] {  
  helper.GetActiveDirectoryGroups(User.Identity.Name) };
  
  GenericPrincipal principal = new GenericPrincipal(identity,roles);
  
   public string[] GetActiveDirectoryGroups(string userName)
      {
            //code here
  
      }
  </code></pre>