title: How to get subsites that a logged user has access in sharepoint 2010
body: <p>I need to retrieve subsites that user has access using Client Object Model. </p>
  
  <p>Here's what I've got:</p>
  
  <pre><code>          NetworkCredential credential = new NetworkCredential(user, pwd, domain);
            ClientContext clientContext = new ClientContext(string.Format("http://{0}:{1}/", server, port));
            clientContext.Credentials = credential;
  
              Web oWebsite = clientContext.Web;
  
              clientContext.Load(oWebsite, website =&gt; website.Webs, website =&gt; website.Title);
              clientContext.ExecuteQuery();
  
              infos = new List&lt;Infos&gt;();
  
              Infos info = null;
  
              for (int i = 0; i != oWebsite.Webs.Count; i++)
              {
                  info = new Infos();
  
                  info.SubSite = oWebsite.Webs[i].Title;
                  info.UrlSubSite = oWebsite.Webs[i].ServerRelativeUrl;
  
                  ListCollection lists = oWebsite.Webs[i].Lists;
                  clientContext.Load(lists);
                  clientContext.ExecuteQuery();
  
                  foreach (var list in lists)
                  {
                      Lists myList = new Lists();
                      myList.Title = list.Title;
  
                      info.Listas.Add(myList);
                  }
  
                  infos.Add(info);
              }
  
              var query = from Infos i in infos
                          select i.SubSite;
  
              return query.ToList();
          }
          catch(Exception ex)
          {
              throw ex;
          }
  
          return null;
      }
  </code></pre>
  
  <p>=====</p>
  
  <p>Using this code, I'm getting an <strong>403 forbidden error</strong>. My client user doesn't have access on the root site (that I`m using in ClientContext constructor). But he has under some subsites. I need to get the subsites that he has access (just list them all), using Client Object Model.</p>
  
  <p>Is there another way?</p>