This article explains how to create a service account in Google and give it the required permissions to query the Free Busy.
Creating a Google account that has access to all data is a two-step process.
It requires you to:
- Create a service account
- Give the service account the necessary permissions.
1. Create a service account
Follow this procedure to create the service account used by Cloudiway to migrate Google accounts.
- Open the Google API Console at https://console.developers.google.com
- Create a new project
- Click on Use Google APIs
- Activate the relevant APIs
Note: If you’re going to use Cloudiway Identity Management, you need the AdminSDK,Contacts API and Google+ API. (AdminSDK and Google+ API are not necessary for migration only).
- Next, Click on Credentials
- Click On New Credentials and select Service Account key
- Create a New Service Account with the name of you choice
- Select P12 Key type and click on Create.
- Click on Manage Service accounts
- In the Options column of you service account, click on Edit
- Check Enable Google Apps Domain-Wide Delegation
- If Google Apps ask you, Enter a Product Name shown to users and click on Save
- Else, click directly on Save
- Click in the Options column in the View Client ID link and write down the service account email Address and client ID
2. Set Permissions to the service account
- Go to your Google Apps domain’s control panel: https://admin.google.com
- Click on “Security”
- Click on “Advanced Settings”
- Click on “Manage API Client Access”
- In “Client Name” field, enter the client ID
- In “One or More API Scopes” field, enter https://www.googleapis.com/auth/calendar.freebusy
WARNING : If you add another scope later, existing scopes will be removed. You need to add the whole list at the same time.