title: Solved: No results for /sites?search= using Microsoft Graph
body: <p>Using Microsoft Graph, I want to search for SharePoint sites containing specific names and moreover I want to get a list of all SharePoint sites.</p>
  <p>I am using the following URL in the Graph Explorer:</p>
  <p><a href="https://graph.microsoft.com/v1.0/sites?search=test" rel="nofollow noreferrer">https://graph.microsoft.com/v1.0/sites?search=test</a></p>
  <p>or</p>
  <p><a href="https://graph.microsoft.com/v1.0/sites?search=" rel="nofollow noreferrer">https://graph.microsoft.com/v1.0/sites?search=</a>*</p>
  <p>When using an account from Company A everything works. I receive a list of all results.</p>
  <p>But when using an account from Company B, I get a 404 NOT FOUND response for all queries (although there should be multiple results):</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>{
      "error": {
          "code": "itemNotFound",
          "message": "Item not found",
          "innerError": {
              "date": "2022-01-01T14:59:35",
              "request-id": "xxxxxx",
              "client-request-id": "xxxxxx"
          }
      }
  }</code></pre>
  </div>
  </div>
  </p>
  <p>Maybe it has something to do with the rights of the users?<br />
  I tested with &quot;normal&quot; users at both companies.</p>
  <p><strong>Edit:</strong></p>
  <p>I also get an error (403 Access denied) using the following url:
  <a href="https://graph.microsoft.com/v1.0/sites/root" rel="nofollow noreferrer">https://graph.microsoft.com/v1.0/sites/root</a></p>
  <p>But when accessing a specific site by it's id, everything works.</p>
  <p><strong>Edit 2</strong></p>
  <p>I noticed a relationship with the permissions of the root SharePoint site. If the user has no permission for that site, the mentioned queries are not working. I need to contact the admin of the system to check my suspicion.</p>