开发者

Add new user with read role to site

I am using the sharepoint 2010 client object model to create a new web site under my site collection. As part of this site creation and would like to add a given set of users to my site with read permission.

I found the following example at msdn to do exactly this under the header "assigning a user to a role one a web site" here: http://msdn.microsoft.com/en-us/library/ee535915.aspx. But the object model don't match the one I have available on my machine...

Basically I am not finding the property SiteUsers, which means this critical part of the example is useless:

Principal oUser = oWebsite.SiteUsers.GetByLoginName(@"DOMAIN\alias");

Anyone have a suggestion on whats wrong here or开发者_JS百科 suggestions on alternative ways to add new users to a site with read permissions using the client object model?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜