I have created contactgroups for all of my users but I am finding that the groups I created are not able to be edited in OWA. I can edit them from Outlook, but the majority of our users are using only OWA. Here is the code I used.
// Create new contact objectContactGroup contactGroup = new ContactGroup(Service);
// Set display name
contactGroup.DisplayName = card.FormattedName;
// Loop throgh email addresses
for (int j = 0; j < card.EmailAddresses.Count(); j++)
{
// Create a group member
GroupMember gm = new GroupMember(card.EmailAddresses[j].Address, card.EmailAddresses[j].Address);
// Add members to the group
contactGroup.Members.Add(gm);
}
// Save contact group
contactGroup.Save();