Been trying to add an AD group to an SPGroup programmatically and it's not working.
I've tried:
SPGroup.AddUsers("myADgroup");
and
SPGroupCollection.Add(groupName, currentUser, "myADgroup", groupDescription);
I've tried it both with domain and without.
Any ideas?
Erm, there is no SPGroup.AddUsers("myAdGroup") method. There isn't even an AddUser() method with that format.
Have you tried:
The EnsureUser bit makes sure that the AD group is added as a user of the SPWeb, so you can then assign rights.