title: Which domain need to be whitelisted for a sheets add-on using a third party library in drive and docs setting in google workspace?
body: <p>I have installed a google sheet add on, which uses <a href="https://github.com/googleworkspace/apps-script-oauth2" rel="nofollow noreferrer">https://github.com/googleworkspace/apps-script-oauth2</a> library for authentication. I am able to install the add on without any issues but once I try to login I am getting this error.</p>
  <blockquote>
  <p>Library with identifier OAuth2 is missing (perhaps it was deleted, or you don't have read access?)</p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/qOcIa.png" rel="nofollow noreferrer">Library with identifier OAuth2 is missing (perhaps it was deleted, or you don't have read access?)</a>
  So I tried a couple of settings in the admin console and I figured out that there is a setting which is working.
  <a href="https://i.stack.imgur.com/wkBp5.png" rel="nofollow noreferrer">Functional drive and docs sharing setting</a>
  But I don't want folks outside our org to be able to share drive files with us, so we have restricted it to domains we recognise for security reasons.
  <a href="https://i.stack.imgur.com/aWcIZ.png" rel="nofollow noreferrer">Restricted drive and docs sharing setting</a>
  Now this setting is throwing the above read access error message, is there a way to solve this with our restricted &quot;drive and docs&quot; sharing setting?, which domain can we whitelist to avoid the above error?, where are the third party libraries in apps script accessed from.
  I tried whitelisting domains below, but these do not seem to work.
  <a href="https://i.stack.imgur.com/iWCmo.png" rel="nofollow noreferrer">whitelisted domains</a></p>