Authentication Service Account
Contents
Description
Service accounts are accounts that do not represent a human user. They provide a way to manage authentication and authorization when a human is not directly involved, such as when an application needs to access Google Cloud resources. Service accounts are managed by IAM. [API reference]
Instructions
Follow these steps on how to create Service Account to authenticate and access Google Calendar API in SSIS package or ODBC data source:
Step-1: Create project
This step is optional, if you already have a project in Google Cloud and can use it. However, if you don't, proceed with these simple steps to create one:
-
First of all, go to Google API Console.
-
Then click Select a project button and then click NEW PROJECT button:
-
Name your project and click CREATE button:
-
Wait until the project is created:
- Done! Let's proceed to the next step.
Step-2: Enable Google Calendar API
In this step we will enable Google Calendar API:
-
Select your project on the top bar:
-
Then click the "hamburger" icon on the top left and access APIs & Services:
-
Now let's enable several APIs by clicking ENABLE APIS AND SERVICES button:
-
In the search bar search for
calendar
and then locate and select Google Calendar API: -
Enable Google Calendar API:
- Done! Let's proceed to the next step.
Step-3: Create Service Account
Use the steps below to create a Service Account in Google Cloud:
-
First of all, go to IAM & Admin in Google Cloud console:
-
Once you do that, click Service Accounts on the left side and click CREATE SERVICE ACCOUNT button:
-
Then name your service account and click CREATE AND CONTINUE button:
-
Continue by clicking Select a role dropdown and start granting service account Project Viewer roles:
-
Find Project group and select Viewer role:
-
Finish adding roles by clicking CONTINUE button:
You can always add or modify permissions later in IAM & Admin. -
Finally, in the last step, just click button DONE:
-
Done! We are ready to add a Key to this service account in the next step.
Step-4: Add Key to Service Account
We are ready to add a Key (P12 certificate) to the created Service Account:
-
In Service Accounts open newly created service account:
-
Next, copy email address of your service account for the later step:
-
Continue by selecting KEYS tab, then press ADD KEY dropdown, and click Create new key menu item:
-
Finally, select P12 option and hit CREATE button:
- P12 certificate downloads into your machine. We have all the data needed for authentication, let's proceed to the last step!
Step-5: Share Google Calendar with Service Account
Now it's time to grant Google Calendar read/write permissions to the created service account:
- Login to https://calendar.google.com with Google account credentials whose calendar you want to share with the service account.
- On the top right click gear icon and click Settings item to open configuration.
- Then on the left, click Settings of my calendars section.
- Locate the calendar you want to share and select it.
- In the dropdown hit Share with specific people or groups and click Add people and groups button.
- Enter the service account email address we obtained in the previous section.
- Finally, choose the permissions, e.g.
Make changes to events
: -
- Click Send button to share the calendar.
- That's it! Let's proceed to the configuration!
Step-6: Configure connection
-
Now go to SSIS package or ODBC data source and configure these fields in Service Account authentication configuration:
- In the Service Account Email field paste the service account Email address value you copied in the previous step.
- In the Service Account Private Key Path (i.e. *.p12) field use downloaded certificate's file path.
- Done! Now you are ready to use Google Calendar Connector!
Parameters
Parameter | Label | Required | Default value | Options | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ClientId | Service Account Email | YES |
|
||||||||||
PrivateKeyPath | Service Account Private Key Path (i.e. *.p12) | YES |
|
||||||||||
Scope | Scope |
https://www.googleapis.com/auth/calendar
|
|
||||||||||
RetryMode | RetryMode |
RetryWhenStatusCodeMatch
|
|
|
|||||||||
RetryStatusCodeList | RetryStatusCodeList |
403|429
|
|
||||||||||
RetryCountMax | RetryCountMax |
5
|
|
||||||||||
RetryMultiplyWaitTime | RetryMultiplyWaitTime |
True
|
|
||||||||||
ImpersonateAs | Impersonate As (Enter Email Id) |
|