title: How to access Team Drive using service account with Google Drive .NET API v3
body: <p>Does anyone know which configurations should be done to grant Google service account an access to a Team Drive which is already created?</p>
  
  <p>The idea is to use a service account in a .NET backend application for uploading/downloading files to/from Team Drive which is shared among company employees. For example, company has its <code>company.com</code> domain and provides <code>name.surname@company.com</code> user accounts at Google. Also there is a Team Drive for the employees. One of those accounts (not admin) was used to create the service account and these steps were done so far:</p>
  
  <ul>
  <li>Created a project for an organization in Google Cloud Platform</li>
  <li>Enabled Google Drive API</li>
  <li>Created a service account</li>
  <li>Created a key for that service account</li>
  <li>Assigned Editor/Owner role in IAM tab</li>
  <li>Enabled G Suite Domain-wide Delegation for the service account using the Client ID as described <a href="https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority" rel="noreferrer">here</a> using G Suite admin account.</li>
  </ul>
  
  <p>I couldn't find any mention in the documentation about how to grant the service account an access to Team Drive so that all uploaded files/folders could be visible to all users who have access to the Team Drive. Any useful link on how to do that is appreciated a lot.</p>
  
  <p>For now, when I create a folder or upload a file using the service account, it puts them in a private Drive which belongs to the service account only.</p>
  
  <p>There could be a possible workaround: to upload the files to service account's private drive and share them with the users (this is not preferred by the requirements), but still, if someone tells how exactly to do this, I'll be happy.</p>