Using Sharepoint 2007 webservices from a .Net web application I create a subSite (CreateDWS method). I was originally hoping that the parent permissions would be inherited but no such luck.

According to the http://msdn.microsoft.com/en-us/library/ms772546(office.12).aspx, I should be able to add a XML tag like:

Dim strNewUser As String = <UserInfo> _
<item Email='[email protected]' Name='username'/> _

to the Createdws call. Although I don't get an error it doesn't add the user to the newly created subSite. Can anyone tell me what I'm doing wrong?

Alternatively, is there a webservice I can use to set Inherit Parent permissions explicitly?

Failing that, how can I make this happen or add an Active Directory domain group so that folks in that group can Contribute to the site?

Thanks in Advance

  • Can you post the segment of your code you wrote to add the user?
    – Vivek
    Aug 24, 2010 at 19:16
  • Sure. First I set a Web Reference to sharepointServer/sites/CivilCommit/_vti_bin/dws.asmx Then Dim dWS As dohreg2simm046.Dws = New dohreg2simm046.Dws dWS.Credentials = New NetworkCredential("username", "password", "Domain") vRetVal = dWS.CreateDws("NewDws", strNewUser, txtFirstName.Text + "_" + txtLastName.Text, "") 'Where strNewUser is defined above The site is created but user isn't added. Altimately I want to add an Active Directory group either inherited from the parent or added through a webservice and granted "Contribute" rights. Thanks!
    – Anonymous
    Aug 24, 2010 at 19:30

1 Answer 1


Alternatively you can write and call another segment of code as soon as you create a sub site. This code will call the Permissions Web Service GetPermissionCollection method and copy the site permission of the parent site. Later you can call the AddPermissionCollection method to add the same to the newly created child web site.

more on the permission web service here: http://msdn.microsoft.com/en-us/library/permissions.permissions_methods(v=office.12).aspx

Hope this helps..

  • If you wish to take the other way and add a group to your chid site, then call the Users and Groups Web Service Add Group method and pass in the AD group information. More on this here: msdn.microsoft.com/en-us/library/ms774470(v=office.12).aspx
    – Vivek
    Aug 24, 2010 at 19:26
  • Thank you for your reply. I'd tried using the Permission webservice earlier without success. Probably because I don't understand what it's really doing (or for that matter usergroups). I'd tried using the AddPermission method (which resulted in a soap exception) not the AddPermissionCollection. I'll try that next. I'll get back. N
    – Anonymous
    Aug 24, 2010 at 19:53
  • I'm getting a soap exception error when I try the following: vSPSite = "sites/Root/TestSite" Dim ndPerms As System.Xml.XmlNode ndPerms = pWS.GetPermissionCollection("sites/Root", "List") pWS.AddPermissionCollection(vSPSite, "List", ndPerms) Any idea what I did wrong? Thanks!
    – Anonymous
    Aug 24, 2010 at 20:11
  • Hey.. i see you are using List as the objectType but you are specifying a site as objectName. Try this insted: pWS.AddPermissionCollection(vSPSite, "Web", ndPerms)
    – Vivek
    Aug 25, 2010 at 2:57
  • Thanks but I'd tried it both ways. Might be a permission issue. How does one go about debugging a soap exception anyway?
    – Anonymous
    Aug 25, 2010 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.