title: Authentication errors with Cloud Dataproc and other Google Cloud products
body: <p>I am trying to use <a href="https://cloud.google.com/pubsub" rel="nofollow">Google Cloud PubSub</a> with my <a href="https://cloud.google.com/dataproc" rel="nofollow">Google Cloud Dataproc</a> cluster and I am getting authentication scope errors like the following: </p>
  
  <pre><code>{
    "code" : 403,
    "errors" : [ {
      "domain" : "global",
      "message" : "Request had insufficient authentication scopes.",
      "reason" : "forbidden"
    } ],
    "message" : "Request had insufficient authentication scopes.",
    "status" : "PERMISSION_DENIED"
  }
  </code></pre>
  
  <p>How can I resolve this issue so I can use PubSub (and other Google Cloud) products in my Spark/Hadoop projects running on Cloud Dataproc?</p>