SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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, I should be able to add a XML tag like:

Dim strNewUser As String = <UserInfo> _
<item Email='' 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

share|improve this question
Can you post the segment of your code you wrote to add the user? – Vivek Aug 24 '10 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 '10 at 19:30

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:

Hope this helps..

share|improve this answer
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: – Vivek Aug 24 '10 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 '10 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 '10 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 '10 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 '10 at 14:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.