Google Cloud Blog


This tutorial will walk through, How to create service account in google cloud and download private key json file.

Understanding - What is Google service account and where it is used?

A service account is a special type of Google account intended to represent a non-human user that needs to authenticate and be authorized to access data in Google APIs.

Example: .Net core application is trying to access google storage api's.

Step 1:

Create a new google project or select existing google project.

Step 2:

Create a google service account.

Create google service account

GCP Service account

There are no strict rules on how to name a service account. It is generally a best practice to name a service account to start with "svc" that way you can easily figure out the user is a service account.


Step 3:

Select role for service account. To keep it simple, I making service account a project owner.


GCP Role

GCP Roles

GCP Role created

Step 4:

Now, let's download the service account private key file (JSON), so that we can use in our .net core application. In order to do so, you will first have to create Credentials.

Click API and Services

Api and Services

Click Credentials

Click on Credentials

Select Service account key

Select service account

Finally, click create to download JSON private key file for the service account. Make sure you keep that in a safe location, as with that key any application can access your google cloud resources.

Download Private key json file

JSON File downloaded

Didn't find what you were looking for? Find more on How to create service account in google cloud and download private key json file