Configure OAuth 2.0 for Service Accounts
Use this procedure to configure a secure connection between Mitel applications such as NuPoint UM and Google Apps such as Google Calendar using the OAuth 2.0 protocol.
With this type of server-to-server interaction, the application has to prove its own identity but end users do not need to be involved.
Create an API Project and Client ID in Google
-
Log In to the Google API Console:
-
Open a web browser and navigate to https://code.google.com/apis/console.
-
Enter the domain administrator Email and password to log in.
-
-
Create the Project:
-
Click the Create project button.
-
Enter the Project name (for example, "NuPoint Advanced UM") and click Create. Remain in the project.
-
-
Enable Google APIs for the project:
-
Open the side menu and select API Manager.
-
Select a Google API such as "Calendar API" and click Enable API.
-
Repeat for all Google APIs you want to support. Remain in the project.
-
-
Create the Service Account with Client ID:
-
Open the side menu and select Permissions.
-
Under the Service accounts tab, select Create service account.
-
Enter a Name, select Furnish a new private key and JSON as the file type, and then select Enable Google Apps Domain-wide Delegation. Set a Product name if prompted.
-
Click Create and Close. The service account is created and the file containing the Private Key and Client ID is downloaded.Note: Store the file in a safe location. You will require it to establish your credentials to MSL.
-
For the service account you just created, click View Client ID.
-
Copy the Client ID and click Cancel. You will require the Client ID in the next procedure.
-
-
Manage API Client Access (API Scopes): Once a service account is created, you must enable the scope of access for your client ID.
-
Access the Google Admin console:
-
Open a web browser and navigate to admin.google.com.
-
Enter the domain administrator Email and password to log in.
-
-
Click Security.
-
Click Show more and then click Advanced settings.
-
Under Authentication, click Manage API Client access.
-
On the Manage API client access panel:
-
Paste the client ID in the Client Name box.
-
Enter the following in the One or More API Scopes box:
To support Gmail integration (for NuPoint Advanced UM), enter: https://mail.google.com/
-
Click Authorize.
The client ID now has access to resources in the specified domains.
-
-
Upload Credentials to MSL
This procedure involves uploading your OAuth 2.0 credentials (service account Client ID and Private Key) from your computer to MSL. MiCollab employs these credentials to integrate with publicly available Google Apps.
-
Log in to the MSL Server Manager as "admin".
-
In the navigation tree, under Configuration, click Google Apps.
-
Select the Service Account tab.
-
Under Configuration, choose the following files from your computer:
-
Service Account ID (.json file)
-
Private Key (.p12 file)
Note: The Private Key (.p12 file) file is required only for earlier implementations. -
-
Click Upload Credentials.
-
Confirm that the Client ID, Email address, and Private Key are correct by comparing them to the corresponding fields in the Google API project.
It is now possible to configure a secure connection to publicly-available Google Apps using the OAuth 2.0 protocol for the Service Account client ID.
-
You can generate another private-public key pair and then upload the private key to the Service Account in MSL.
-
OAauth 2.0 data is not included in system (MSL) backups. Accordingly, if you perform a backup and restore procedure, you must then re-enter the OAuth 2.0 data in order to restore the Google Apps integration.