When working with the addpermission method from the permissions.asmx web service, you have the possibility to add permissions to a list or site for users or groups.
When you specify a group as permissionType, you could only specify a SharePoint group that exists on the site. You are not able to specify an Active Directory group, but that does not mean that it is not possible.
The trick to add Active Directory group permissions, is by adding them as an user instead of specifying group.
Here is an example of a SOAP message to add an Active Directory group to the site:
|
|
Two things are important:
- Set the permissionType to user;
- In the permissionIdentifier specify the Active Directory group as: DOMAIN-NAME\GROUP-NAME.