Getting Error: Oauth Client from Service account

Error: failed to make Fs to list Shared Drives: drive: failed when making oauth client: failed to create oauth client from service account: error processing credentials: google: read JWT from JSON credentials: 'type' field is "" (expected "service_account")

I am getting this while configuring service accounts any body pls help me

It looks like the file you've used for a service account is in the wrong format.

It should be a JSON file and look something like this

  "type": "service_account",
  "project_id": "XXX",
  "private_key_id": "XXX",
  "private_key": "-----BEGIN PRIVATE KEY-----\nXXXn-----END PRIVATE KEY-----\n",
  "client_email": "",
  "client_id": "XXX",
  "auth_uri": "",
  "token_uri": "",
  "auth_provider_x509_cert_url": "",
  "client_x509_cert_url": ""

Hi! I have the same issue. I suppuse that the Google Cloud Console is generating a JSON secret in a new format.

"installed": {
"client_id": "",
"project_id": "yyyy",
"auth_uri": "Anmelden – Google Konten",
"token_uri": "https ://",
"auth_provider_x509_cert_url": "https ://",
"client_secret": "xxxx",
"redirect_uris": [
"http ://localhost"

It looks more like a Oauth2 configuration, a private key is missing there.

Anybody has an idea how to generate a secret in valid format?

Bump :wink: :smiley: :slight_smile:
I cannot configure backups synchronization to second location :frowning:

I ran through it, got the same format as @ncw

No issues making a key through the Google Admin console.

Perhaps contact Google support if you are getting the same format.

1 Like

@Animosity022 Could you please write the steps you "clicked" to get the proper format? :slight_smile: I must be doing something wrong.

Just the docs:

I need to configure Google Cloud Storage not Google Drive :slight_smile:

I went through the procedure again and now I get the proper format, weird but I don't know why the result is different. Thanks so much for your help and time :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.