Let me put it other way, If you do not run a program under elevent context and loop though all the webs in a site it would present you with the following error
"Access denied. You do not have permission to perform this action or access this resource."
You can however useGetSubwebsForCurrentUser() which would only get you all the sites current user has access to.
Here is a client object model example
WebCollection result = oWebsite.GetSubwebsForCurrentUser(new SubwebQuery()); clientContext.Load(result, n => n.Include(o => o.Title));
clientContext.ExecuteQuery();
No comments:
Post a Comment